Skip to content

Instantly share code, notes, and snippets.

View IanWhalen's full-sized avatar

Ian Whalen IanWhalen

View GitHub Profile
@IanWhalen
IanWhalen / list-files-by-edit-date.sh
Last active March 30, 2020 23:37
For a given git repo, list the files in reverse order of recently touched
while read file; do echo $(git log --pretty=format:%ai -n 1 --date=raw -- $file) $file; done < <(git ls-tree -r --name-only HEAD) | sort -r
#!/bin/bash
# Helpful wrapper that uploads takes a single optional commit (defaulting to HEAD) and uploads
# the patch to cr with the subject and description based on the git commit message. This is
# useful if your workflow involves keeping a single commit that you intend to push per review,
# and modifying the commit based on feedback. This script is traditionally called {{cruc}}.
# Any additional arguments are passed directly to the upload script so you can still use {{-i issue_number}}.
UPLOAD_SCRIPT=fill
JIRA_USER=me
@IanWhalen
IanWhalen / deprecate_mmap_testing.py
Created November 13, 2017 14:28
Given the evergreen.yml file, create a new file which moves all MMAPv1 tasks to a new set of MMAPv1-only buildvariants.
'''Given the evergreen.yml file, this creates a new file which moves all MMAPv1 tasks
to a new set of MMAPv1-only buildvariants.
'''
# /usr/bin/python3
from ruamel.yaml import YAML
def main():
'''The thing that does the work.'''
javascript: { var dragBar = document.getElementById("ghx-detail-head"); var detailView = document.getElementById("ghx-detail-view"); var headerGroup = document.getElementById("ghx-column-header-group"); var controlGroup = document.getElementById("ghx-detail-head"); var tmpElem = document.createElement('div'); tmpElem.innerHTML = '<span style="display: block;" id="js-sizer" class="ghx-sizer ui-resizable-handle ui-resizable-w" data-tooltip="Resize Detail View" original-title=""><span class="ghx-icon ghx-icon-sizer"></span></span>'; var dragElem = tmpElem.childNodes[0]; controlGroup.insertBefore(dragElem,controlGroup.childNodes[0]); var currentWidth = localStorage.getItem('jiraWidth') || '400px'; currentStylesheet = document.createElement('style'); currentStylesheet.innerHTML = '#ghx-detail-view { width: ' + currentWidth + ' !important;} '; document.body.insertBefore(currentStylesheet, document.body.childNodes[0]); dragBar.addEventListener ("mousedown" , startJiraDrag , false); var stateMouseDown = false; var mo
NewRect = fabric.util.createClass(fabric.Rect, {
type: 'newRect',
initialize: function(options) {
options || (options = { });
console.log('initializing NewRect');
this.callSuper('initialize', options);
}
});
chai = require 'chai'
chai.should()
{Class} = require '../class'
describe 'Class', ->
it 'exists', ->
Class.should.be.ok
@IanWhalen
IanWhalen / gist:825524
Created February 14, 2011 05:36
Pip install from github
pip install -E virtualenvname -e git+git://github.com/username/repository-name.git#egg=repository-name