Skip to content

Instantly share code, notes, and snippets.

View ashb's full-sized avatar

Ash Berlin-Taylor ashb

View GitHub Profile
@lenary
lenary / gitconfig.ini
Created February 18, 2011 01:21
a special excerpt of my gitconfig
$ git clone github:lenary/guides.git
Cloning into guides...
remote: Counting objects: 255, done.
remote: Compressing objects: 100% (216/216), done.
remote: Total 255 (delta 111), reused 163 (delta 35)
Receiving objects: 100% (255/255), 1.49 MiB | 564 KiB/s, done.
Resolving deltas: 100% (111/111), done.
$ cd guides
$ git remote -v
require 'formula'
class TmuxIterm2 < Formula
url 'http://iterm2.googlecode.com/files/tmux-for-iTerm2-20120203.tar.gz'
sha1 'b0c78e3f142cc735f0518951c04eab947ca7c95b'
homepage 'http://code.google.com/p/iterm2/'
depends_on 'libevent'
def install
require 'minitest/autorun'
###
# Test to demonstrate TCO in Ruby. Tested in 1.9.2+
class TestTCO < MiniTest::Unit::TestCase
code = <<-eocode
class Facts
def fact_helper(n, res)
if n == 1
res

This document is intended to be a simplified version of the OAuth 2.0 specification. In particular it has been written with implementors in mind, and as such attempts to trim the spec down to just what you need to implement an OAuth provider or client. It is necessarily not complete, but attempts to introduce spec requirements in the same order in which the protocol proceeds in practise, with everything you need to know about each protocol endpoint brought together in one place rather than scattered across a large document.

@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

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 = git@github.com: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:

@gnarf
gnarf / ..git-pr.md
Last active April 12, 2024 22:00
git pr - Global .gitconfig aliases for Pull Request Managment

Install

Either copy the aliases from the .gitconfig or run the commands in add-pr-alias.sh

Usage

Easily checkout local copies of pull requests from remotes:

  • git pr 4 - creates local branch pr/4 from the github upstream(if it exists) or origin remote and checks it out
  • git pr 4 someremote - creates local branch pr/4 from someremote remote and checks it out
@jtopper
jtopper / gist:8588263
Last active June 14, 2024 13:06
Add a new disk to a VMWare vagrant box
config.vm.provider :vmware_fusion do |vm|
vdiskmanager = '/Applications/VMware\ Fusion.app/Contents/Library/vmware-vdiskmanager'
dir = "#{ENV['HOME']}/vagrant-additional-disk"
unless File.directory?( dir )
Dir.mkdir dir
end
#!/bin/bash
set -xe
cd $HOME
# Remove the build cache and get Glide
rm -Rf $GOPATH/src/*
go get github.com/Masterminds/glide
mkdir -p $HOME/.go_workspace/src/github.com/$CIRCLE_PROJECT_USERNAME/
cd $HOME/.go_workspace/src/github.com/$CIRCLE_PROJECT_USERNAME
@thomascube
thomascube / app.js
Created January 4, 2020 13:53
Automated Docker builds with Google cloud functions
const bent = require('bent');
const httpJSON = bent('json');
const admin = require('firebase-admin');
const DOCKER_BUILD_TRIGGER = 'https://hub.docker.com/api/build/v1/source/<this-is-secret>/trigger/<another-secret>/call/';
const BUILD_TAGS = {
'1.3.x-apache': '7.2-apache',
'1.3.x-fpm': '7.2-fpm',
'1.3.x-fpm-alpine': '7.2-fpm-alpine',
'1.4.x-apache': '7.3-apache',
'1.4.x-fpm': '7.3-fpm',