This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" = ^ . ^ = | |
syntax on | |
set hlsearch | |
filetype on | |
au BufNewFile,BufRead *.xD set filetype=php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" = ^ . ^ = | |
syntax on | |
set hlsearch | |
filetype on | |
au BufNewFile,BufRead *.xD set filetype=php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# drupal2pgpass | |
# Convert drupal 6 pgsql db_url to .pgpass format and set permissions | |
# Andres Hernandez (tonejito) | |
# May 2014 | |
# http://wiki.postgresql.org/wiki/Pgpass | |
# https://api.drupal.org/api/drupal/developer!globals.php/global/db_url/6 | |
# https://api.drupal.org/api/drupal/sites!default!default.settings.php/6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# hibernate.sh | |
# Clear swap and hibernate laptop | |
# Andres Hernandez - Tonejito | |
# May 2014 | |
# | |
# Requires /etc/sudoers.d/hibernate for this script to work automagically | |
# | |
# Released under the BSD License |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# install certificate into CApath | |
# I use relative paths to keep compatibility with chroot'd environments | |
cd /etc/ssl/certs/ | |
ln -vsf ../../../usr/lib/vmware-ovftool/certs/cacert.pem vmware.pem | |
# Regenerate openssl CA database | |
c_rehash > /dev/null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for bin in which apache2ctl grep awk sort | |
do | |
if [ ! -x "`which $bin`" ] | |
then | |
exit 1 | |
fi | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/sed -f | |
s/\([aeiou]\)/\1f\1/g | |
s/\([AEIOU]\)/\1f\1/g | |
s/\([áéíóúü]\)/\1f\1/g | |
s/\([ÁÉÍÓÚÜ]\)/\1f\1/g |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# ./display-site-info | |
# | |
# Andres Hernandez - tonejito_AT_comunidad_DOT_unam_DOT_mx | |
# Display Apache HTTPD VirtualHost ServerName, ServerAlias and DocumentRoot for each loaded site | |
# Released under the BSD License | |
for bin in which apache2ctl awk sed xargs egrep | |
do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -vx | |
# | |
# Wipe partition data and MBR | |
# | |
# Andres Hernandez (tonejito) - tonejito_AT_comunidad_DOT_unam_DOT_mx | |
# | |
# Released under the GPLv3 license | |
for x in /dev/sda? | |
do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# = ^ . ^ = | |
# 0750 root:staff /usr/local/sbin/zap | |
# Restart services, clear cache and re-enable swap | |
# Andres Hernandez - tonejito | |
# https://gist.github.com/tonejito/c16666facf5da68584d6 |