Skip to content

Instantly share code, notes, and snippets.

@samrose
samrose / gist:fa047c9f55d9006cebf1
Last active August 29, 2015 14:03
forcefactory puppet
mkdir forcefactory
cd forcefactory
vagrant init
add to Vagrantfile
config.vm.box = "ubuntu/trusty64"
config.vm.box_url = "ubuntu/trusty64"
vagrant up
@samrose
samrose / nodenpmubuntu
Created July 7, 2014 13:37
Getting node and npm to work on ubuntu 12.04
Following https://www.digitalocean.com/community/tutorials/how-to-install-an-upstream-version-of-node-js-on-ubuntu-12-04 to compile and install latest version of node and npm
packages;
apache
postfix
mysql
rt4-clients
@samrose
samrose / py_data_distro
Last active August 29, 2015 14:04
python data distro
#sudo apt-get update
#sudo apt-get install python-pip python-dev libxml2-dev libxslt-dev libatlas-base-dev gfortran
#curl -O http://download.zeromq.org/zeromq-4.0.4.tar.gz
#tar -xzf zeromq-4.0.4.tar.gz
#cd zeromq-4.0.4
#./configure --prefix=$VIRTUAL_ENV && make -j && sudo make install
#pip install pyzmq tornado
curl -O http://09c8d0b2229f813c1b93-c95ac804525aac4b6dba79b00b39d1d3.r79.cf1.rackcdn.com/Anaconda-2.0.1-Linux-x86_64.sh
sudo sh -c "echo 'LC_ALL=en_US.UTF-8\nLANG=en_US.UTF-8' >> /etc/environment"
createdb --encoding=UTF-8 --lc-collate=en_US.UTF-8 --lc-ctype=en_US.UTF-8 --owner=uscbri --template=template0 usbcri
wget http://downloads.sourceforge.net/project/geoserver/GeoServer/2.3.5/geoserver-2.3.5-war.zip
@samrose
samrose / rabbitmq_user_pass_exchange
Created August 1, 2014 20:26
setting up rabbitmq vhost user and password rabbitmq 3.x
rabbitmqctl add_user user pass
rabbitmqctl add_vhost vhostname
rabbitmqctl set_permissions -p vhsotname user ".*" ".*" ".*"
YouCompleteMe
nerdtree
nercommenter
http://stevelosh.com/blog/2011/06/django-advice/#editing-with-vim
@samrose
samrose / zato_commands
Last active August 29, 2015 14:06
zato commands
zato quickstart create ~/tmp/qs-1/ postgresql localhost 5432 zato1 zato1 localhost 6379 --verbose
cd qs-1
./zato-qs-start.sh
@samrose
samrose / smc_shell_commands
Last active August 29, 2015 14:08
SMC shell commands
sudo rm -rf /var/www/vagrant.local/smcnew && drush make /home/samrose/smc_make/smc.make /home/samrose/smcnew && sudo mv /home/samrose/smcnew /var/www/vagrant.local && mkdir /var/www/vagrant.local/smcnew/sites/default/files && chmod -R 777 /var/www/vagrant.local/smcnew/sites/default/files && cp /var/www/vagrant.local/smcnew/sites/default/default.settings.php /var/www/vagrant.local/smcnew/sites/default/settings.php && chmod 777 /var/www/vagrant.local/smcnew/sites/default/settings.php && cd /var/www/vagrant.local/smcnew && drush site-install smc --account-name=admin --account-pass=admin --db-url=mysql://root:foo@localhost/smcnew --site-name="Social Media Classroom" [email protected] [email protected] -y && drush fra -y
from libcloud.compute.types import Provider
from libcloud.compute.providers import get_driver
import libcloud.security
import os
ACCESS_ID = 'myid'
SECRET_KEY = 'mykey'
IMAGE_ID = 'ami-00a15868'
SIZE_ID = 't1.micro'