Make your old Drupal Sites Static, Faster and Safer.

Recently I helped to "staticalize" the past Drupalcon sites on
This makes the sites static, faster, safer and less error-prone. Works like a live archive of the past events.
For that i use this wget command:
wget -m -U Mozilla --page-requisites \
--retry-connrefused \
--limit-rate=5000k \
--convert-links \
--html-extension \
--restrict-file-names=windows \
--domains ${SITE} \
--no-parent http://${SITE}/

HowTo check and mark badblocks on ext4 Partitions

My storage is acting weird today and i'm trying to fix it with this command:
~# fsck.ext4 -vcDfty -C 0 /dev/sdb1
e2fsck 1.42.3 (14-May-2012)
Checking for bad blocks (read-only test): 19.10% done, 25:33 elapsed. (0/0/0 errors)

and this was the result:

Tweaking the History of your Bash

I use bash every day and i want to keep track of EVERYTHING
(and with dates, please)
add this to your .bashrc if you want to keep track of your stuff also:
#10 Million records:
export HISTSIZE=10000000
# Timestamps, Format: YYYY-MM-DD HH:mm:SS

How to check the headers of a Site using a custom IP address

This will check the site against the IP on Port 80 :
~$ curl -Is -H "host:"
HTTP/1.1 200 OK
Server: nginx
Content-Type: text/html; charset=utf-8
X-Drupal-Cache: HIT
Etag: "1372246782-0"
Content-Language: en
X-Generator: Drupal 7 (
Cache-Control: public, max-age=0
Last-Modified: Wed, 26 Jun 2013 11:39:42 +0000
Expires: Sun, 19 Nov 1978 05:00:00 GMT
Vary: Cookie,Accept-Encoding
X-AH-Environment: prod

How to clear Iptables and be more open to the world

So... you want to embrace network "fun" and open all ports to outsiders?
Here you are:
iptables -F
iptables -X
iptables -t nat -F
iptables -t nat -X
iptables -t mangle -F
iptables -t mangle -X
iptables -P INPUT ACCEPT

Good luck!
Just be sure of what you are doing...


Subscribe to ricardo's drupal 7 blog RSS