An introduction to curl using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
An introduction to curl using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
| #! /usr/bin/env python | |
| import threading | |
| import subprocess | |
| import traceback | |
| import shlex | |
| class Command(object): | |
| """ | |
| Enables to run subprocess commands in a different thread with TIMEOUT option. |
| # The latest version of this script is now available at | |
| # https://github.com/jasoncodes/dotfiles/blob/master/aliases/rbenv.sh | |
| VERSION=1.9.3-p286 | |
| brew update | |
| brew install rbenv ruby-build rbenv-vars readline ctags | |
| if [ -n "${ZSH_VERSION:-}" ]; then | |
| echo 'eval "$(rbenv init - --no-rehash)"' >> ~/.zshrc | |
| else | |
| echo 'eval "$(rbenv init - --no-rehash)"' >> ~/.bash_profile |
With Facebook's Graph API and the creation of the Open Graph protocol, it is now easier then ever before to read and write data from and to the "social graph". Here's a few of the possibilities:
| import os | |
| from fabric.api import env, require, run, sudo, cd | |
| env.project_name = '' | |
| env.server_name = '' | |
| env.webapps_root = '/opt/webapps/' | |
| env.project_root = os.path.join(env.webapps_root, env.project_name) | |
| env.activate_script = os.path.join(env.project_root, 'env/bin/activate') | |
| env.wsgi_file = os.path.join(env.project_root, 'django.wsgi') |