An introduction to curl
using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
# | |
# .screenrc - GNU screen user configuration file | |
# | |
# $Id: .screenrc 190 2010-04-17 07:54:54Z yoshikaw $ | |
# | |
# @see http://www.informatik.uni-hamburg.de/RZ/software/screen/screen_toc.html | |
# @see http://www.limy.org/program/screen_command.html | |
# | |
# Escape key is C-t, literal is a. |
# | |
# Example of a user's .screenrc file | |
# | |
# http://www.orkut.com/CommMsgs.aspx?cmm=1988&tid=4 | |
# This is how one can set a reattach password: | |
# password ODSJQf.4IJN7E # "1234" | |
multiuser on |
require 'rubygems' | |
require 'yaml' | |
# A demonstration of YAML anchors, references and handling of nested values | |
# For more info, see: | |
# http://atechie.net/2009/07/merging-hashes-in-yaml-conf-files/ | |
stooges = YAML::load( File.read('stooges.yml') ) | |
# => { | |
# "default" => { |
python3 -c 'import sys, yaml, json; y=yaml.safe_load(sys.stdin.read()); print(json.dumps(y))' |
<!doctype html> | |
<!-- | |
Using cookies and nginx web server configuration to conditionally serve | |
high resolution images to <img> tags | |
--> | |
<html> | |
<head> | |
<!-- set device-pixel-ratio cookie using JavaScript --> | |
<script type="text/javascript" charset="utf-8"> |
An introduction to curl
using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
/*--- waitForKeyElements(): A utility function, for Greasemonkey scripts, | |
that detects and handles AJAXed content. | |
Usage example: | |
waitForKeyElements ( | |
"div.comments" | |
, commentCallbackFunction | |
); |
Wes Winham [email protected]
There are many tutorials floating around the web that almost get you a dynamic VPN in EC2. The goal of this tutorial is to be a one-stop-shop for this specific setup.
#!/bin/bash | |
git branch -d -r `git branch -r | awk '{ if ($0 !~ /next|master/) printf "%s", $0 }'` | |
git branch -D `git branch | awk '{ if ($0 !~ /next|master/) printf "%s", $0 }'` |
Locate the section for your github remote in the .git/config
file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = [email protected]:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
to this section. Obviously, change the github url to match your project's URL. It ends up looking like this: