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 | |
# | |
# A git hook for automatically running commands | |
# based on the name of files modified in the | |
# previous changeset | |
# | |
# To install as a post-merge hook (on `git pull`): | |
# $ cp hook.sh .git/hooks/post-merge && chmod 755 $_ | |
# | |
# To install as a post-checkout hook (changing branches): |
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
ls | |
mkdir .ssh | |
chmod 600 .ssh/ | |
cd ssh | |
vim .ssh/authorized_keys | |
cd .ssh/ | |
ls | |
ls -al | |
chmod .ssh 700 | |
chmod 700 .ssh |
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
import re | |
from xml.dom import minidom | |
from difflib import get_close_matches | |
# The old sitemap.xml file | |
sourceXML = minidom.parse('sitemap-old.xml') | |
# sitemap.xml from the new site | |
targetXML = minidom.parse('sitemap-new.xml') | |
sourceNodes = sourceXML.getElementsByTagName('loc') |
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
<url> | |
<loc>http://newdomain.com/2009/06/old-random-name.html</loc> | |
<lastmod>2009-09-09T19:35:36-08:00</lastmod> | |
<changefreq>monthly</changefreq> | |
<priority>1.0</priority> | |
</url> |
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
<url> | |
<loc>http://olddomain.com/2009/06/01/old-random--name.aspx</loc> | |
<changefreq>daily</changefreq> | |
</url> |
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
# Create a directory to store all the sources we will need to compile/install | |
mkdir ~/src | |
cd ~/src | |
wget http://www.python.org/ftp/python/2.6.4/Python-2.6.4.tgz | |
tar xzvf Python-2.6.4.tgz | |
cd Python-2.6.4 | |
yum install apr-devel zlib-devel postfix mod_ssl openssl-devel sqlite sqlite-devel bzip2-devel | |
# These switches ensure python is compiled with threading, as a shared library, and reference zlib | |
./configure --with-threads --enable-shared --with-zlib=/usr/include |
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
cd ~/src | |
wget http://bit.ly/6E0DNN | |
chmod u+x setuptools-0.6c11-py2.6.egg | |
./setuptools-0.6c11-py2.6.egg --prefix=/usr/local | |
easy_install -U pip | |
pip install -U virtualenv |
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
wget http://initd.org/pub/software/psycopg/psycopg2-2.0.13.tar.gz | |
yum install postgresql-devel | |
tar xzvf psycopg2-2.0.13.tar.gz | |
cd psycopg2-2.0.13 | |
python2.6 setup.py build | |
python2.6 setup.py install |
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
-- Install git | |
cd ~/src | |
wget http://kernel.org/pub/software/scm/git/git-1.6.6.tar.gz | |
tar xzvf git-1.6.6.tar.gz | |
cd git-1.6.6 | |
./configure | |
make | |
make install | |
-- Install mercurial |
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
mkdir /opt/env/ | |
chown django:django /opt/envs | |
su - django | |
cd /opt/env | |
virtualenv --no-site-packages django-mingus | |
pip install -E django-mingus/ psycopg2 | |
source django-mingus/bin/activate | |
cd djagno-mingus | |
git clone git://github.com/montylounge/django-mingus.git | |
cd django-mingus/mingus |