Skip to content

Instantly share code, notes, and snippets.

[alias]
aa = add --all
au = add --update
br = branch
ci = commit
co = checkout
dc = diff --no-prefix --cached
df = diff --no-prefix
glg = !git-graph-log
graph = log --graph --oneline --decorate --date-order

Keybase proof

I hereby claim:

  • I am kl-7 on github.
  • I am kl7 (https://keybase.io/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:

@KL-7
KL-7 / private.xml
Created October 31, 2015 21:48
Karabiner
<?xml version="1.0"?>
<root>
<item>
<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>
<identifier>remap.consumer_to_cmd_fkeys_f13</identifier>
<autogen>__KeyToKey__ KeyCode::F13, ModifierFlag::COMMAND_L, ConsumerKeyCode::MUSIC_PREV</autogen>
<autogen>__KeyToKey__ KeyCode::F14, ModifierFlag::COMMAND_L, ConsumerKeyCode::MUSIC_PLAY</autogen>

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 www.boost.org/libs/graph/doc 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

@KL-7
KL-7 / git-graph-log.sh
Created November 25, 2012 10:35
Git graph log
#!/bin/bash
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 left.zip(right).map { |l, r| %Q(#{l.chop} #{r[/^[\s\*\\\|\/_]*(.*)$/, 1]}) }
@KL-7
KL-7 / collation.java
Created June 15, 2012 16:15
ICU collation test
import com.ibm.icu.lang.UCharacter;
import com.ibm.icu.text.Collator;
public class CollationDemo {
private Collator collator;
public static void main(String arg[]) {
new CollationDemo().runDemo();
}
@KL-7
KL-7 / filltsoa.py
Created June 1, 2012 19:23
Fill track album sort order for iTunes
#!/usr/bin/env python
import logging
import sys
from os import path
from mutagen.easyid3 import EasyID3
from mutagen.id3 import ID3NoHeaderError
totalfiles = 0
@KL-7
KL-7 / bspline.py
Created April 20, 2012 22:38
B-splines editor.
from __future__ import division
import math
def bspline(points, m):
'''
points - control points
m - degree of B-splines
'''
@KL-7
KL-7 / lastfm.md
Created April 13, 2012 20:25
Hide Last.fm client's icon from dock when you close it on Mac OS X.

Add that to the bottom of the main dict section in Last.fm/Contents/info.plist file:

<key>LSUIElement</key>
<string>1</string>
def init_var
puts 'init var...'
'var value'
end
puts 'define class A'
class A
@@var = init_var