As configured in my dotfiles.
start new:
tmux
start new with session name:
| from django.test.simple import DjangoTestSuiteRunner | |
| from django.test import TransactionTestCase | |
| from mongoengine import connect | |
| class TestRunner(DjangoTestSuiteRunner): | |
| def setup_databases(self, **kwangs): | |
| db_name = 'testsuite' | |
| connect(db_name) | |
| print 'Creating test-database: ' + db_name |
| RVM home page: http://rvm.beginrescueend.com | |
| Install RVM | |
| ------------ | |
| See http://rvm.beginrescueend.com/rvm/install/ | |
| bash < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer) | |
| Install rvm for all users |
| var loveit = function(){ | |
| var e,el,interval=Math.random()*60000; | |
| e = new jQuery.Event("click"); | |
| e.pageX=1; | |
| e.pageY=1; | |
| el = jQuery('.record_pile:last').nextAll('a').eq(2); | |
| turntable.lastMotionTime=new Date().getTime(); | |
| el.hover().trigger(e); | |
| setTimeout(loveit, interval); | |
| }; |
| var loveit = function(){var e,el,interval=Math.random()*60000;e = new jQuery.Event("click");e.pageX=1;e.pageY=1;el = jQuery('.record_pile:last').nextAll('a').eq(2);turntable.lastMotionTime=new Date().getTime();el.hover().trigger(e);setTimeout(loveit, interval);};loveit(); |
| /* | |
| * | |
| * Instead of a single backend, let's set up a more complex multi-server director. | |
| * This director will randomly assign each request to one of three application servers. | |
| * | |
| */ | |
| director backend random { | |
| .retries = 5; | |
| { | |
| .backend = { |
| # Solarized colorscheme/theme from | |
| source-file git/github/tmux-colors-solarized/tmuxcolors.conf | |
| # Report that we can handle 256 colors | |
| set -g default-terminal "screen-256color" | |
| # Rebind prefix to avoid conflicts | |
| #unbind C-b | |
| #set -g prefix C-q | |
| #bind C-q send-prefix |
| """ | |
| A few notes: | |
| * Lines starting with "#" signs are standard Python code comments | |
| * Multi-line comments can be wrapped in triple-quotes (""") | |
| """ | |
| from itertools import islice, product | |
| import calendar | |
| from BeautifulSoup import BeautifulSoup | |
| import requests |
As configured in my dotfiles.
start new:
tmux
start new with session name:
##References
##Create Models
Create tables:
rails g model Location
rails g model User
rails g model Checkin
| worker_processes 2; # sets two workers. might need 4 in a very high-traffic environment. | |
| user www-data; # user to run nginx as. | |
| pid /var/run/nginx.pid; # you'll have to create this pidfile or else things won't work. | |
| events { | |
| worker_connections 1024; # connections each worker can take. | |
| use epoll; # epoll is vastly superior to other alternatives. | |
| } | |
| http { |