Instantly share code, notes, and snippets.


Keybase proof

I hereby claim:

  • I am kl-7 on github.
  • I am kl7 ( on keybase.
  • I have a public key whose fingerprint is 7CD1 5D2D 4F8E 2AC0 14AB E1F2 457B A98E 66D0 35BB

To claim this, I am signing this object:

View private.xml
<?xml version="1.0"?>
<name>Music Controls to Cmd + F13,F14,F15</name>
<appendix>* Music Prev to Cmd+F13</appendix>
<appendix>* Music Play/Pause to Cmd+F14</appendix>
<appendix>* Music Next to Cmd+F15</appendix>
<autogen>__KeyToKey__ KeyCode::F13, ModifierFlag::COMMAND_L, ConsumerKeyCode::MUSIC_PREV</autogen>
<autogen>__KeyToKey__ KeyCode::F14, ModifierFlag::COMMAND_L, ConsumerKeyCode::MUSIC_PLAY</autogen>
View README.rdoc

Ruby Graph Library (RGL) Build Status

RGL is a framework for graph data structures and algorithms.

The design of the library is much influenced by the Boost Graph Library (BGL) which is written in C++ heavily using its template mechanism. Refer to for further links and documentation on graph data structures and algorithms and the design rationales of BGL.

A comprehensive summary of graph terminology can be found in the the graph

set -e
ruby -e "
left = %x(git log --graph --oneline --decorate --date-order $1 --color=always).lines
right = %x(git log --graph --oneline --decorate --date-order $1 --pretty=format:'%C(bold green)(%cr)%C(reset) %C(bold cyan)<%an>%C(reset)').lines
puts { |l, r| %Q(#{l.chop} #{r[/^[\s\*\\\|\/_]*(.*)$/, 1]}) }
public class CollationDemo {
private Collator collator;
public static void main(String arg[]) {
new CollationDemo().runDemo();
#!/usr/bin/env python
import logging
import sys
from os import path
from mutagen.easyid3 import EasyID3
from mutagen.id3 import ID3NoHeaderError
totalfiles = 0
from __future__ import division
import math
def bspline(points, m):
points - control points
m - degree of B-splines

Add that to the bottom of the main dict section in file:

View lazy_class_variable.rb
def init_var
puts 'init var...'
'var value'
puts 'define class A'
class A
@@var = init_var
View gist:1966887
on run {input, parameters}
tell application "Finder"
set sel to selection
if (count sel) > 0 then
set myTarget to item 1 of sel
else if (count window) > 0 then
set myTarget to target of window 1
set myTarget to path to home folder
end if