An introduction to curl
using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
# If you work with git, you've probably had that nagging sensation of not knowing what branch you are on. Worry no longer! | |
export PS1="\\w:\$(git branch 2>/dev/null | grep '^*' | colrm 1 2)\$ " | |
# This will change your prompt to display not only your working directory but also your current git branch, if you have one. Pretty nifty! | |
# ~/code/web:beta_directory$ git checkout master | |
# Switched to branch "master" | |
# ~/code/web:master$ git checkout beta_directory | |
# Switched to branch "beta_directory" |
""" | |
@author: jay | |
""" | |
from BeautifulSoup import BeautifulSoup | |
import gdbm | |
import pickle | |
import time | |
def main(): |
An introduction to curl
using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
This is taken from here. http://stackoverflow.com/questions/67699/how-do-i-clone-all-remote-branches-with-git/72156#72156 Want this as a gist because I always come back to this posting.
First, clone a remote git repository and cd into it:
$ git clone git://example.com/myproject
$ cd myproject
Next, look at the local branches in your repository:
Create an empty git repo or reinitialize an existing one
git init
# ============================================================================================== | |
# | |
# Microsoft PowerShell Source File -- Created with SAPIEN Technologies PrimalScript 2007 | |
# | |
# NAME: Server/Workstation Inventory (CompInv_v2.ps1) | |
# | |
# AUTHOR: Jesse Hamrick | |
# DATE : 2/25/2009 | |
# Web : www.PowerShellPro.com | |
# COMMENT: Script Inventories Computers and sends results to an excel file. |
# coding=utf8 | |
import PIL | |
from PIL import ImageFont | |
from PIL import Image | |
from PIL import ImageDraw | |
def text2png(text, fullpath, color = "#000", bgcolor = "#FFF", fontfullpath = None, fontsize = 13, leftpadding = 3, rightpadding = 3, width = 200): | |
REPLACEMENT_CHARACTER = u'\uFFFD' | |
NEWLINE_REPLACEMENT_STRING = ' ' + REPLACEMENT_CHARACTER + ' ' |
#!/usr/bin/python | |
# create the union of a set of mozilla bookmarks files | |
# usage: ./beq.py bookmarks-20110501.html bookmarks-20120101.html > bookmarks.html | |
# | |
# license: the code is in the public domain | |
from bs4 import BeautifulSoup | |
from jinja2 import Template | |
import sys |
I recently had the following problem:
We didn't want to open the MySQL port to the network, but it's possible to SSH from the Jenkins machine to the MySQL machine. So, basically you would do something like
ssh -L 3306:localhost:3306 remotehost
Press minus + shift + s
and return
to chop/fold long lines!