This file contains hidden or 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
Format system | |
Format data | |
Format cache | |
Wipe data | |
Wipe cache | |
Wipe Dalvik cache | |
Install Rom! |
This file contains hidden or 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
(19|20)([0-9][0-9])\-(0[1-9]|1[0-2])\-(0[1-9]|1[0-9]|2[0-9]|3[0-1]) |
This file contains hidden or 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
FILENAME=$1 | |
while read LINE | |
do | |
cp "$LINE" ./destination-folder/ | |
done < $FILENAME |
This file contains hidden or 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
def upload_tar(): | |
# First, get the last deployed commit's short hash. 1st time, just create the file manually. | |
last_deployed = local('cat last_deployed', capture=True) | |
# get the last commit's short hash | |
current_commit = local('git rev-parse --short HEAD', capture=True) | |
# get the list of changed files since last deployed commit, put them in a tgz file, named as the commit to be deployed. | |
local('git archive --format tar HEAD $(git diff --name-only HEAD %s) | gzip -9 > %s.tgz' % (last_deployed, current_commit)) | |
# put the .tgz file to server, in project's archive/ directory | |
put('%s.tgz' % current_commit, '%s/archive/' % env.path) | |
# move the local file inside the archive/ directory, so the root is clean |
This file contains hidden or 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
sudo apt-get install libjpeg8 libjpeg62-dev libfreetype6 libfreetype6-dev | |
sudo ln -s /usr/lib/x86_64-linux-gnu/libjpeg.so /usr/lib | |
sudo ln -s /usr/lib/x86_64-linux-gnu/libfreetype.so /usr/lib | |
sudo ln -s /usr/lib/x86_64-linux-gnu/libz.so /usr/lib | |
pip install PIL |
This file contains hidden or 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
# This block will catch static file requests, such as images, css, js | |
# The ?: prefix is a 'non-capturing' mark, meaning we do not require | |
# the pattern to be captured into $1 which should help improve performance | |
location ~* \.(?:ico|css|js|gif|jpe?g|png)$ { | |
# Some basic cache-control for static files to be sent to the browser | |
expires max; | |
# Does the same as Cache-Control: public | |
add_header Pragma public; |
This file contains hidden or 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
# Error: _pylibmcmodule.h:42:36: fatal error: libmemcached/memcached.h: No such file or directory | |
# install these | |
sudo apt-get install -y libmemcached-dev zlib1g-dev libssl-dev python-dev build-essential |
This file contains hidden or 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
echo "cd /mnt/project_name_beta/;git pull origin dev;sudo supervisorctl restart project_name" | ssh -i ~/Works/keys/project_name.pem [email protected] |
This file contains hidden or 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
# Execute this from a user who has permission to create database | |
CREATE DATABASE newdb WITH TEMPLATE originaldb OWNER dbuser; |
This file contains hidden or 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
sudo aptitude install nginx python-dev libmysqlclient-dev libmemcached-dev zlib1g-dev libssl-dev python-dev build-essential libjpeg8 libjpeg62-dev libfreetype6 libfreetype6-dev rubygems python-setuptools chromium-browser postgresql mysql-server terminator postgresql-server-dev-9.1 curl git mercurial |