Skip to content

Instantly share code, notes, and snippets.

View tsabat's full-sized avatar

Tim Sabat tsabat

View GitHub Profile
<% @logs.each do |logname, logvalue| %>
<%= logname %>: '<%= logvalue %>',
<%Qend %>
@tsabat
tsabat / supervisor.conf
Created December 28, 2011 15:09
Sample supervisor config file
; Sample supervisor config file.
[unix_http_server]
file=/tmp/supervisor.sock ; (the path to the socket file)
;chmod=0700 ; sockef file mode (default 0700)
;chown=nobody:nogroup ; socket file uid:gid owner
;username=user ; (default is no username (open server))
;password=123 ; (default is no password (open server))
;[inet_http_server] ; inet (TCP) server disabled by default
@tsabat
tsabat / nfs_and_vagrant.md
Created January 5, 2012 19:35
NFS and Vagrant

my vagrant settings

config.nfs.map_uid = 0
config.nfs.map_gid = 0

config.vm.share_folder "v-data", "/opt/webapp", "source"
config.vm.share_folder "v-data", "/home/vagrant/customization", "home"

my permissions on the host source dir defined above

@tsabat
tsabat / ssh_key_push.md
Created January 6, 2012 19:02
Push your ssh keys to a remote server
set nocompatible
set number
set ruler
syntax on
let mapleader = ","
call pathogen#infect()
call pathogen#helptags()
set t_Co=256
action :install do
#convenience variable. "new_resource" properties are defined when the provider is defined.
r = new_resource
install_path = "#{r.parent_dir}/#{r.name}"
src_path = "#{install_path}/src/#{r.name}"
etc_path = "#{install_path}/etc"
generation_path = "#{install_path}/generated"
@tsabat
tsabat / gist:1596000
Created January 11, 2012 18:20
vagrant port forwarding.sh
config.vm.forward_port "http", 80, 8080
@tsabat
tsabat / supervisor_no_such_process_name.md
Created January 12, 2012 19:20
supervisor no such process name

###Problem

I can't get supervisor to tail running processes properly. I'm running version 3.0a8.

Here's my supervisord.conf file

[inet_http_server]
port=9011

[supervisord]

@tsabat
tsabat / virtualbox_and_vagrant.md
Created January 12, 2012 23:15
virtualbox and vagrant install on ubuntu 11.10

Download Virtualbox.

Get the newest version or an old build

For example:

http://download.virtualbox.org/virtualbox/4.1.6/virtualbox-4.1_4.1.6-74713~Ubuntu~oneiric_amd64.deb

then

@tsabat
tsabat / gist:1624841
Created January 17, 2012 05:03
wtf.sh
vagrant@lucid64:/opt/webapp/txtasvc/etc$ /opt/webapp/txtasvc/bin/python /opt/webapp/txtasvc/bin/paster serve /opt/webapp/txtasvc/etc/app.ini --server-name=paste httpport=8300
Traceback (most recent call last):
File "/opt/webapp/txtasvc/bin/paster", line 8, in <module>
load_entry_point('PasteScript==1.7.5', 'console_scripts', 'paster')()
File "/opt/webapp/txtasvc/lib/python2.6/site-packages/paste/script/command.py", line 104, in run
invoke(command, command_name, options, args[1:])
File "/opt/webapp/txtasvc/lib/python2.6/site-packages/paste/script/command.py", line 143, in invoke
exit_code = runner.run(args)
File "/opt/webapp/txtasvc/lib/python2.6/site-packages/paste/script/command.py", line 238, in run
result = self.command()