Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

Setting up a good cocoapods environment

Before you start

Make sure that you have the latest version of Xcode installed from the Mac App Store, and that you have the command line tools installed. To install the command line tools, open Xcode, click Xcode->Preferences->Downloads->Command Line Tools

Install brew if needed.

ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"

Install bump package:
$ pip install bump
create a dummy version file:
$ echo 'VERSION = "0.0.0"' > version.py
bump help:
@siso
siso / gist:5eb892bc4b666e68e07e
Created November 14, 2014 02:50
Rax-AutoScaler - test pip package locally
# create pip package
(raxas)siso@pdp11:~/workspace/rax-autoscaler$ make source
# create fresh virtual environment
(test-raxas)siso@pdp11:~/tmp/20141114-130825$ mkvirtualenv test-raxas
# install pip package locally
(test-raxas)siso@pdp11:~/tmp/20141114-130825$ tar xvfz ~/workspace/rax-autoscaler/dist/RAX-AutoScaler-0.1.0.tar.gz && cd RAX-AutoScaler-0.1.0 && python setup.py install
# test it
@siso
siso / gist:3b47326f195a7df3a185
Created April 24, 2015 03:49
MongoDB Replica

Create MongoDB data dirs:

mkdir -p data/rs1 data/rs2 data/rs3

Start three mongod instances:

mongod --replSet m101 --logpath "1.log" --dbpath data/rs1 --port 27017 --smallfiles --oplogSize 64 --fork
@siso
siso / gist:c257a1ac5f6dc56d4930
Created June 23, 2015 03:10
Wallpaper with IPv4 infor for Raspberry Pi, Rapbian, LXDE
#!/usr/bin/env sh

export DISPLAY=:0.0

CANVAS=$(mktemp).jpg
WALLPAPER=$(mktemp).jpg

# Create white background image
convert -size 1280x800 xc:white $CANVAS
@siso
siso / gist:7089444
Last active December 26, 2015 03:59
How to upload a local file to CloudFiles. Remote container and file name can be specified on the CLI. $ python upload_file.py -u USERNAME -k APIKEY --local-file /PATH/TO/LOCAL/FILE --container CONTAINER --remote-file PATH/TO/REMOTE/FILE
import argparse
import pyrax
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument('-k', '--api-key', help='Authentication api-key', required=True)
parser.add_argument('-i', '--identity-type',
help='identity type (default: \'rackspace\')',
default='rackspace')
parser.add_argument('--container', help='remote container', required=True)
@siso
siso / .tmux.conf
Last active December 29, 2015 04:59 — forked from v-yarotsky/.tmux.conf
tmux for screen users, on OSX
### INSTALLATION NOTES ###
# 1. Install Homebrew (https://github.com/mxcl/homebrew)
# 2. brew install zsh
# 3. Install OhMyZsh (https://github.com/robbyrussell/oh-my-zsh)
# 4. brew install reattach-to-user-namespace --wrap-pbcopy-pbpaste && brew link reattach-to-user-namespace
# 5. Install iTerm2
# 6. In iTerm2 preferences for your profile set:
# Character Encoding: Unicode (UTF-8)
# Report Terminal Type: xterm-256color
# 7. Put itunesartist and itunestrack into PATH

Keybase proof

I hereby claim:

  • I am siso on github.
  • I am siso (https://keybase.io/siso) on keybase.
  • I have a public key ASCt2EqSXKfEdi6dA9B0j0n0sjNagCBxj6WhbJcEoKMJ2go

To claim this, I am signing this object:

@siso
siso / svgscreenshot.py
Created June 5, 2015 04:40
Take SVG screenshot
#!/usr/bin/env python
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from PIL import Image
browser = webdriver.Firefox()