An introduction to curl using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
| update_current_git_vars |
| #!/bin/sh | |
| # Check if the individual developer has his own hook | |
| CMD_NAME=`basename $0` | |
| if [ -f $GIT_DIR/hooks/personal/$CMD_NAME ] | |
| then | |
| # If so, run it. $@ passes all the command line arguments passed to this function | |
| # If the personal hook fails, fail this one as well | |
| if ! $GIT_DIR/hooks/personal/$CMD_NAME $@ | |
| then |
| #!/usr/local/bin/ruby | |
| # encoding: UTF-8 | |
| require 'yaml' | |
| require "base64" | |
| require 'rexml/document' | |
| class PList < BasicObject | |
| ELEMENT_PROCESSORS = {} | |
| def self.process_element_named(name, &block); ELEMENT_PROCESSORS[name.to_s] = block; end | |
| def self.process_element(elt) ; ELEMENT_PROCESSORS[elt.name][elt]; end |
| #!/bin/bash | |
| if [ "$1" = "-h" -o "$1" = "--help" -o -z "$1" ]; then cat <<EOF | |
| appify v3.0.1 for Mac OS X - http://mths.be/appify | |
| Creates the simplest possible Mac app from a shell script. | |
| Appify takes a shell script as its first argument: | |
| `basename "$0"` my-script.sh |
| // | |
| // Regular Expression for URL validation | |
| // | |
| // Author: Diego Perini | |
| // Created: 2010/12/05 | |
| // Updated: 2018/09/12 | |
| // License: MIT | |
| // | |
| // Copyright (c) 2010-2018 Diego Perini (http://www.iport.it) | |
| // |
| # These are my notes from the PragProg book on CoffeeScript of things that either | |
| # aren't in the main CS language reference or I didn't pick them up there. I wrote | |
| # them down before I forgot, and put it here for others but mainly as a reference for | |
| # myself. | |
| # assign arguments in constructor to properties of the same name: | |
| class Thingie | |
| constructor: (@name, @url) -> | |
| # is the same as: |
| license: gpl-3.0 |
| #!/bin/sh | |
| # Just copy and paste the lines below (all at once, it won't work line by line!) | |
| # MAKE SURE YOU ARE HAPPY WITH WHAT IT DOES FIRST! THERE IS NO WARRANTY! | |
| function abort { | |
| echo "$1" | |
| exit 1 | |
| } | |
| set -e |
| arr = Array:: | |
| arrSlice = arr.slice | |
| curry = -> | |
| args = arrSlice.call arguments | |
| -> | |
| args2 = arrSlice.call arguments | |
| args[0].apply @, args.slice(1).concat(args2) | |
| sum = -> |
An introduction to curl using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin