Skip to content

Instantly share code, notes, and snippets.

View carlwoodward's full-sized avatar
🤠

Carl Woodward carlwoodward

🤠
  • Scentre Group
  • Sydney
View GitHub Profile
/* - - - - - - - - - - - - - - - - - - - - -
Title : Example Custom CSS : DinoMaster!
URL : http://wufoo.com
Last Updated : April 1, 2011
- - - - - - - - - - - - - - - - - - - - -
INSTRUCTIONS

When using ProMotion and motion-kit I get this error:

2014-10-27 20:57:15.880 revisit_motion[40985:1651453] comment_cell.rb:25:in `setup:': Invalid Reference - probably recycled (WeakRef::RefError)
	from table.rb:121:in `create_table_cell:'
	from table.rb:110:in `table_view_cell:'
	from table.rb:153:in `tableView:cellForRowAtIndexPath:'
2014-10-27 20:57:15.894 revisit_motion[40985:1651453] *** Terminating app due to uncaught exception 'WeakRef::RefError', reason: 'comment_cell.rb:25:in `setup:': Invalid Reference - probably recycled (WeakRef::RefError)
	from table.rb:121:in `create_table_cell:'

Given a SHA from a commit that is inside of a pull request, without using git log and some grep abomination, how do you go from the SHA to reading the pull request. Has anyone made some crazy GitHub API extension that I haven't seen? Is there any overlay of git blame that can show pull requests as well?

function! SelectaBuffers()
let bufcount = bufnr('$')
let buflist = []
for bufnum in range(1, bufcount)
let bufname = bufname(bufnum)
if !(bufname =~ '^fugitive://') && !(bufname =~ '^/') && !(bufname =~ '^\.')
call add(buflist, bufname)
endif
endfor
@carlwoodward
carlwoodward / mini_app.ex
Created January 29, 2014 22:18
Mini router for elixir.
defmodule MiniApp do
defmodule Router do
@route_stack []
defmacro __using__(_opts) do
quote do
import unquote(__MODULE__)
end
end
@carlwoodward
carlwoodward / ember_websocket_adapter.js
Created January 27, 2014 23:49
A simple websocket adapter for ember-js.
Web.Store = DS.Store.extend();
DS.WebsocketAdapter = DS.RESTAdapter.extend({
callbacks: {},
socket: null,
beforeOpenQueue: [],
ajax: function(url, type, params) {
var adapter = this;
var uuid = adapter.generateUuid();
#!/usr/bin/env ruby
require "date"
class Branch < Struct.new(:name, :date)
end
branches = `git branch -a`.split("\n").map do |branch_name|
unless branch_name.include?("*") || branch_name.include?("->")
has_activity = `git log --abbrev-commit --date=short -1 #{branch_name}`
@carlwoodward
carlwoodward / monitor_files.vim
Created April 7, 2013 12:35
Add a line every time a file is opened or saved to ~/vim_files.csv. Tracks git branch and commit. Useful for time tracking. NOTE: this does slow down your save slightly.
autocmd BufWritePre,BufRead * exec 'silent :! echo "%:p,`date`,`if [ -d $(pwd)/.git ]; then GIT_DIR=$(pwd)/.git git rev-parse --abbrev-ref HEAD; fi`,`if [ -d $(pwd)/.git ]; then GIT_DIR=$(pwd)/.git git log --pretty=format:\"\%h\" -n 1; fi`" >> ~/vim_files.csv &'
@carlwoodward
carlwoodward / das_download.rb
Created November 12, 2012 12:18 — forked from kalbasit/das_download.rb
Script to download all Destroy All Software screencasts, account needed
#! /usr/bin/env ruby
# usage:
# $ das_download.rb email password [download_directory]
require 'mechanize'
# gem 'mechanize-progressbar'
email = ARGV[0] or raise('Please provide the email address for your account')
password = ARGV[1] or raise('Please provide the password for your account')
path = (ARGV[2] || './').gsub /\//,''
@carlwoodward
carlwoodward / gist:1336106
Created November 3, 2011 09:13
Push state codes
$('a.pushstate').live 'click', (event) ->
event.preventDefault()
pushStateRouter.navigate $(this).attr('href'), true
Backbone.history.start pushState: true