Skip to content

Instantly share code, notes, and snippets.

View justinabrahms's full-sized avatar

Justin Abrahms justinabrahms

View GitHub Profile
@ieure
ieure / python-pep8.el
Created February 12, 2010 18:49
Run pep8.py on Python source in Emacs.
;;; python-pep8.el --- minor mode for running `pep8'
;; Copyright (c) 2009, 2010 Ian Eure <ian.eure@gmail.com>
;; Author: Ian Eure <ian.eure@gmail.com>
;; Keywords: languages python
;; Last edit: 2010-02-12
;; Version: 1.01
@ieure
ieure / python-pylint.el
Created February 12, 2010 18:49
Run pylint on Python source in Emacs.
;;; python-pylint.el --- minor mode for running `pylint'
;; Copyright (c) 2009, 2010 Ian Eure <ian.eure@gmail.com>
;; Author: Ian Eure <ian.eure@gmail.com>
;; Keywords: languages python
;; Last edit: 2010-02-12
;; Version: 1.01
@dmkash
dmkash / br.sh
Created April 10, 2012 22:44
Shell Script for tmux setup
#!/bin/sh
SESSION_NAME="big_red"
cd ~/Sites/within3/big_red
tmux has-session -t ${SESSION_NAME}
if [ $? != 0 ]
then
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active July 17, 2024 14:20
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@dominicrodger
dominicrodger / tox2travis.py
Last active December 20, 2015 00:49
Quick and hacky way of going from a tox.ini file to a .travis.yml file.
from tox._config import parseconfig
print "language: python"
print "python: 2.7"
print "env:"
for env in parseconfig(None, 'tox').envlist:
print " - TOX_ENV=%s" % env
print "install:"
print " - pip install tox"
print "script:"

Sprintly Rendering notes

FilteredCollection Events

FilteredCollection events are not granular: 'load', 'reset', 'filter-complete', and 'loaded' always trigger in sequence, and usually in duplicate, so there's no way to determine when to safely take a rendering action based on collection lifecycle events.

'sort' events are repeated many times on FilteredCollections--ideally sort events should be silent unless a change has actually occured. Binding rendering actions on 'sort' isn't possible because of all the duplicate events.

There are only a few events that I feel should be taking place in the lifecycle of a given FilteredCollection:

import re
diff_re = re.compile(
"@@ \-(?P<removed_start>\d+),(?P<removed_length>\d+) "
"\+(?P<added_start>\d+),(?P<added_length>\d+) @@"
)
class DiffContext:
@h1k3r
h1k3r / hostname.lua
Created June 25, 2014 19:52
Lua - get hostname
local _M = {}
function _M.getHostname()
local f = io.popen ("/bin/hostname")
local hostname = f:read("*a") or ""
f:close()
hostname =string.gsub(hostname, "\n$", "")
return hostname
end
return _M
@thoward
thoward / oscon-2014-group-bike-ride.md
Last active March 28, 2017 00:08
OSCON 2014 Group Bike Ride

OSCON 2014 Group Bike Ride

Love bikes and open source? In town for OSCON 2014? Join us for a group ride.

bike pic

WHEN

Wednesday, July 23rd 2014 at 6:00pm

@marionzualo
marionzualo / code_review.md
Last active August 30, 2023 08:11
Code Reviews

Code Review

A guide for reviewing code and having your code reviewed.

Peer code reviews are the single biggest thing you can do to improve your code - Jeff Atwood

Purpose

Code review is an important part of a team's development process. It helps to:

  • disseminate knowledge about the codebase/technology/techniques across teams
  • increase awareness of the features being developed