Skip to content

Instantly share code, notes, and snippets.

View bossjones's full-sized avatar
💭
Learning every damn thing I can

Malcolm Jones (bossjones/Tony Dark) bossjones

💭
Learning every damn thing I can
View GitHub Profile
.idea/*
*.pyc
@bossjones
bossjones / chat.py
Last active August 29, 2015 14:08 — forked from wojas/chat.py
import gevent.monkey
gevent.monkey.patch_all()
import os
import sys
import fcntl
import gevent
from gevent.socket import wait_read
from redis import Redis
@bossjones
bossjones / install_php_new_relic_via_fabric.sh
Created February 25, 2015 19:27
Install new relic on rax image servers
# stage
fab -H preimage21.be.net install_php_new_relic:app_name="image",location="rax",tier="stage"
# prod
fab -H beimage51.be.net,beimage52.be.net,beimage53.be.net,beimage54.be.net install_php_new_relic:app_name="image",location="rax",tier="production"
@bossjones
bossjones / gist:4a5cad7e2160864ac64a
Created February 25, 2015 19:33
Setup nagios 51-64
# prod
for i in {51..64}; do cat ~bossjones/beimage21_wo_comments.cfg | sed "s,beimage21,beimage${i},g" | sed "s,127.0.0.1,$(echo $(nslookup beimage$i.be.net|grep ^Address|tail -1|awk '{print $2}')),g" > /etc/nagios/cloudservers/beimage$i.cfg; done
@bossjones
bossjones / fab_build.sh
Created February 26, 2015 23:23
image-service 1.1.5
_BUILD_ENV_DIR=~/dev/anaconda/apps/behance/build-env
_BUILD_DIR=~/dev/anaconda/apps/behance/build
cd $_BUILD_DIR && ./build.py -p image -t dev -r us-east-1 -b 1.1.5 -m mir-jh --ignore-platform-reqs && ./build.py -p image -t stage -r us-east-1 -b 1.1.5 -m mir-bm --ignore-platform-reqs && cd $_BUILD_DIR && ./build.py -p image -t stage -r us-east-1 -b 1.1.5 -m mir-sh --ignore-platform-reqs
fab build_all --set product=mir-jh,tier=dev,region=us-east-1,clusters=img && fab build_all --set product=mir-bm,tier=stage,region=us-east-1,clusters=img && fab build_all --set product=mir-sh,tier=stage,region=us-east-1,clusters=img && cd $_BUILD_DIR && ./build.py -p image -t prod -r us-east-1 -b 1.1.5 -m mir --ignore-platform-reqs && fab build_all --set product=mir,tier=prod,region=us-east-1,clusters=img
cd $_BUILD_DIR && ./build.py -p image -t dev -r us-east-1 -b 1.1.5 -m mir-jh --ignore-platform-reqs && ./build.py -p image -t stage -r us-east-1 -b 1.1.5 -m mir-bm --ignore-platform-reqs && cd $_BUILD_DIR && ./build.py -p
@bossjones
bossjones / vim74centos
Last active August 29, 2015 14:16 — forked from juxtin/vim74centos
#!/bin/bash
yum groupinstall 'Development tools' -y
yum install ncurses ncurses-devel wget git -y
cd /usr/local/src
wget ftp://ftp.vim.org/pub/vim/unix/vim-7.4.tar.bz2
tar -xjf vim-7.4.tar.bz2
cd vim74
./configure --prefix=/usr --with-features=huge --enable-rubyinterp --enable-pythoninterp
make && make install
@bossjones
bossjones / ipython_anaconda_testing.py
Created March 10, 2015 17:16
ipython_anaconda_testing.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import argparse
import ConfigParser
import pprint
import os
sys.path.append("../../../anaconda")
@bossjones
bossjones / note.md
Last active August 29, 2015 14:17 — forked from fyears/note.md

if you are using linux, unix, os x:

pip install -U setuptools
pip install -U pip

pip install numpy
pip install scipy
pip install matplotlib
#pip install PySide
# using brew installed Python
brew install portaudio portmidi libsndfile liblo jack
brew link portaudio portmidi libsndfile liblo
cd ~/Sites/tmp
svn checkout http://pyo.googlecode.com/svn/trunk/ pyo-read-only
# Replace 'venv' with the foldername of your virtualenv.
# This script links the gst module and it's dependecies into the virtualenv.
# Tested on ubuntu 12.04
sudo apt-get install python-gst0.10
cd venv/lib/python2.7/site-packages
ln -s /usr/lib/python2.7/dist-packages/glib
ln -s /usr/lib/python2.7/dist-packages/gobject
ln -s /usr/lib/python2.7/dist-packages/gst-0.10
ln -s /usr/lib/python2.7/dist-packages/gstoption.so