Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python
# vim: ai ts=4 sts=4 et sw=4
import sys, os
from django.core.management import execute_manager
import settings
if __name__ == "__main__":
[~/dev]$ git clone git@github.com:rapidsms/rapidsms-contrib-apps-dev.git contrib-apps-dev
Initialized empty Git repository in /Users/ewheeler/dev/contrib-apps-dev/.git/
remote: Counting objects: 8893, done.
remote: Compressing objects: 100% (3420/3420), done.
remote: Total 8893 (delta 5161), reused 8730 (delta 5079)
Receiving objects: 100% (8893/8893), 2.60 MiB | 325 KiB/s, done.
Resolving deltas: 100% (5161/5161), done.
error: git checkout-index: unable to create symlink locations/static/javascripts/label-overlay.js (File name too long)
error: git checkout-index: unable to create symlink locations/static/javascripts/mask.js (File name too long)
error: git checkout-index: unable to create symlink locations/static/stylesheets/label-overlay.css (File name too long)
#!/usr/bin/ruby
# vim: noet noai
require "md5"
user = "rm129"
pass = "adam"
url = "http://192.168.10.1/login"
login = `curl -s #{url}`
#/bin/bash
mysqldump -u root llin > /home/adammck/llin.sql && gzip /home/adammck/llin.sql && scp /home/adammck/llin.sql.gz unicef@ec2:/home/unicef/llin.sql.gz && rm llin.sql.gz
# load default settings
source "$HOME/.screenrc"
# start all new windows in the project root
chdir "$HOME/rapidsms/core/"
# start rapidsms (note that we're not just invoking
# it with the new window, because that causes the
# window to CLOSE if/when the program terminates)
screen -t rapidsms
export HISTCONTROL=erasedups
export HISTSIZE=10000
shopt -s histappend
export EDITOR=vim
stty -echoctl
PS1='\[\033[31;33m\][\w]\$ \[\033[0m\]'
export LSCOLORS=DxGxcxdxBxegedabagacad
alias ls='ls -G'
alias rmpyc='find . -name "*.pyc" -exec rm {} \;'
# disable the splash screen
# why is this not the default??
startup_message off
# scroll back a long way (^A Esc)
defscrollback 6000
# show hostname and window list in the status bar
# -----------------------------------------------
# adapted from http://stackoverflow.com/questions/359424/detach-subdirectory-into-separate-git-repository
# clone your rapidsms repo and name it rapidsms-core
cd rapidsms-core
# remove the apps directory:
git filter-branch --index-filter "git rm -r -f --cached --ignore-unmatch apps" --prune-empty HEAD
git reset --hard
git remote rm origin
rm -rf .git/refs/original/
git reflog expire --expire=now --all
" disable word wrap
set nowrap
set expandtab
set tabstop=8
set softtabstop=4
set shiftwidth=4
set shiftround
set autoindent
export HISTCONTROL=erasedups
export HISTSIZE=10000
shopt -s histappend
export EDITOR=vim
stty -echoctl
PS1='\[\033[0;37m\][\w]\$ \[\033[0m\]'
export LSCOLORS=DxGxcxdxBxegedabagacad
alias ls='ls -G'