Skip to content

Instantly share code, notes, and snippets.

View elprup's full-sized avatar

elprup elprup

View GitHub Profile
@elprup
elprup / emr_tools.py
Created June 25, 2013 02:55
emr ini config and run tools
'''
EMR tools
Easy emr python console
author: yaowei
create: 2013-06-24
'''
import copy
import os.path
import boto.emr
@elprup
elprup / scribe_precise_install.sh
Last active December 17, 2015 16:59
install facebook/scribe in ubuntu precise 12.04 script
#!/bin/bash
wget --no-check-certificate https://ftp-master.debian.org/keys/archive-key-6.0.asc && apt-key add archive-key-6.0.asc
sudo gpg --keyserver hkp://pgp.mit.edu --recv-keys 16126D3A3E5C1192
sudo gpg --export --armor 16126D3A3E5C1192 | sudo apt-key add -
sudo apt-get install libboost-all-dev libboost-test-dev libboost-program-options-dev libevent-dev automake libtool flex bison pkg-config g++ libssl-dev git-core make
wget http://archive.apache.org/dist/thrift/0.9.0/thrift-0.9.0.tar.gz
@elprup
elprup / install_r_lucid.sh
Created March 26, 2013 01:37
install R in ubuntu 10.04
sudo apt-get install gfortran g++ libreadline6-dev libxt-dev
make
sudo make install
@elprup
elprup / manage.py
Last active December 15, 2015 00:49
simpler interface for boto iam
import boto.iam
import time
import urllib2
import logging
# connetc to iam
# default boto config file location: /etc/boto.cfg
conn = boto.connect_iam()
#setup logging
@elprup
elprup / scribeconfig.cfg
Created March 11, 2013 07:24
scribe product config sample (master slave mode)
# master config
port=1456
max_msg_per_second=2000000
max_queue_size=10000000
check_interval=3
<store>
category=heartbeat
type=file
file_path=/mnt/heartbeat

Going from GUI Git to Command Line Git

Preface

First of all, the ladies love command line. You are guaranteed to pick up twice as many chicks because you are in a completely black application window with monospace font. That's dark. Like, Sabbath dark.

Seriously though...

It's a piece of cake. And you don't need to abandon the GUI. Sometimes it's nice to see what's going on, so don't feel like a jabroni if you hit up something like Tower or Github for Mac.

Let's Git (see what I did there?) Started...

First of all, setup Git so all your diffs are in color. As suggested by Erik Reagan, this helped me a ton. Just run git config --global color.ui true in your command line and you'll be set.

@elprup
elprup / mpbot.py
Created January 16, 2013 01:57
non-blocking gtalk bot using multiple process
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# non-blocking gtalk bot using multiple process
#
import sys
import time
from multiprocessing import Pool
@elprup
elprup / mysqlsvn.py
Created November 27, 2012 08:00
MySQL tables svn-like sync between server
#!/bin/python
'''
MySQL tables svn-like sync between server
@ through ssh connect
@ incremental sync
@ can retry and redo
@ svn-style mode
@ timeout
version 1.2
modified 2012-12-11
@elprup
elprup / scribe_lucid_install.sh
Last active February 15, 2017 09:09
install facebook/scribe in ubuntu lucid 10.04 script
#!/bin/bash
sudo apt-get update
sudo apt-get install libboost-all-dev libboost-test-dev libboost-program-options-dev libevent-dev automake libtool flex bison pkg-config g++ libssl-dev git-core make
wget http://archive.apache.org/dist/thrift/0.9.0/thrift-0.9.0.tar.gz
tar xzvf thrift-0.9.0.tar.gz
cd thrift-0.9.0
@elprup
elprup / s3load.py
Created October 31, 2012 06:13
copy plain log to category log in s3 system
#!/usr/bin/python
'''
s3load
Version 0.2 2012-11-09
copy plain log to category log in s3 system
usage:
s3load.py source destination
'''
import re
import os