This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3.0 | |
import sys, array, tempfile, heapq | |
assert array.array('i').itemsize == 4 | |
def intsfromfile(f): | |
while True: | |
a = array.array('i') | |
a.fromstring(f.read(4000)) | |
if not a: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set emacsclient to "/Applications/Emacs.app/Contents/MacOS/bin-x86_64-10_9/emacsclient -n -c -a \"/Applications/Emacs.app/Contents/MacOS/Emacs\"" | |
on open location input | |
do shell script emacsclient & "\"" & input & "\"" | |
end open location | |
on open inputs | |
repeat with raw_input in inputs | |
set input to POSIX path of raw_input | |
do shell script emacsclient & "\"" & input & "\"" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun kk/setup-fonts (&rest args) | |
(interactive) | |
(set-face-font 'default "Source Code Pro for Powerline-11") | |
(set-fontset-font t 'hebrew (font-spec :name "Courier New-11")) | |
) | |
(advice-add 'server-create-window-system-frame :after 'kk/setup-fonts) | |
(advice-add 'server-create-tty-frame :after 'kk/setup-fonts) | |
(unless (daemonp) (kk/setup-fonts)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Evernote = Application("Evernote"); | |
try | |
{ | |
var newnotes = []; | |
var note, tags, tl, url, newNote, noteWindow; | |
var before = Evernote.tags.byName("foo"); | |
var error = Evernote.tags.byName("bar"); | |
var after = Evernote.tags.byName("baz"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#These directories may be excluded: | |
# contains mounted file systems | |
.gvfs | |
.local/share/gvfs-metadata | |
# contains the actual encrypted home directory | |
.Private | |
# session-specific | |
.dbus | |
.cache |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(setq kk/org-packages | |
'( | |
;; package kk/orgs go here | |
org | |
cdlatex | |
)) | |
;; List of packages to exclude. | |
(setq kk/excluded-packages '()) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(setq testvar nil) | |
nil | |
(defmacro testmacro () | |
(if testvar "OMG, I passed the test!") | |
(pp "I failed! damn!"))) | |
testmacro | |
(setq test-simple (testmacro)) | |
"I failed! damn!""\"I failed! damn!\"" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun kk/run-with-no-helm (orig-func &rest args) | |
"Run a function without helm completion." | |
(if (boundp 'helm-mode) | |
(let ((orig-helm-mode helm-mode)) | |
(unwind-protect | |
(progn | |
(helm-mode 0) | |
(apply orig-func args) | |
) | |
(helm-mode (if orig-helm-mode 1 0)))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Thanks to @samsonjs for the cleaned up version: | |
# https://gist.github.com/samsonjs/4076746 | |
PREFIX=$HOME | |
VERSION=1.2.3 | |
# Install Protocol Buffers | |
wget http://protobuf.googlecode.com/files/protobuf-2.4.1.tar.bz2 | |
tar -xf protobuf-2.4.1.tar.bz2 | |
cd protobuf-2.4.1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# encoding: utf-8 | |
# == Synopsis | |
# Requires the terminal-notifier gem ([sudo] gem install terminal-notifier) | |
# growlnotify wrapper to turn Growl alerts into Mountain Lion notifications | |
# Uses growlnotify option syntax to keep your old scripts working with the new shiny. | |
# | |
# If you use Growl via growlnotify in your shell scripting, this script | |
# will replace Growl's alerts with Mountain Lion notifications. |