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
su postgres | |
pg_dropcluster --stop 9.1 main | |
pg_upgradecluster 8.4 main |
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
Number.prototype.plural = function(){ | |
if(this > 1 || this == 0){ | |
return true; | |
} else { | |
return false; | |
} | |
} | |
String.prototype.pluralize_rules = function(){ | |
return [[new RegExp('$', 'gi'), 's']]; |
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
SELECT nspname || '.' || relname AS "relation", | |
pg_size_pretty(pg_relation_size(C.oid)) AS "size" | |
FROM pg_class C | |
LEFT JOIN pg_namespace N ON (N.oid = C.relnamespace) | |
WHERE nspname NOT IN ('pg_catalog', 'information_schema') | |
ORDER BY pg_relation_size(C.oid) DESC | |
LIMIT 20; |
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
The Python PATH can be changed by either editing HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Python (if we're on 64-bit) or HKEY_LOCAL_MACHINE\SOFTWARE\Python if we're using a 32-bit machine. This may be necessary in cases of like custom installations. |
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 | |
# We need to invoke Byobu just so that it'll create the ~/.byobu directory | |
byobu-tmux new-session -d | |
byobu kill-server | |
echo "bind-key -n F1 new-window | |
bind-key -n F2 previous-window | |
bind-key -n F3 next-window" > ~/.byobu/keybindings.tmux |
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 virtualenvwrapper library | |
sudo pip install virtualenvwrapper | |
# Configure .bashrc | |
echo "export WORKON_HOME=$HOME/.virtualenvs | |
export PROJECT_HOME=/vagrant | |
source /usr/local/bin/virtualenvwrapper.sh" >> ~/.bashrc |
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 | |
echo "deb http://www.rabbitmq.com/debian/ testing main" | tee -a /etc/apt/sources.lst | |
echo "deb http://packages.erlang-solutions.com/ubuntu precise contrib" | tee -a /etc/apt/sources.lst | |
# Upgrade Erlang | |
wget http://packages.erlang-solutions.com/ubuntu/erlang_solutions.asc | |
sudo apt-key add erlang_solutions.asc | |
wget https://www.rabbitmq.com/rabbitmq-signing-key-public.asc |
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 sys | |
import time | |
import logging | |
import os | |
from watchdog.observers import Observer | |
from watchdog.observers.polling import PollingObserver | |
from watchdog.events import PatternMatchingEventHandler | |
import subprocess | |
class DocsCompiler(PatternMatchingEventHandler): |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
OlderNewer