Skip to content

Instantly share code, notes, and snippets.

View zeekay's full-sized avatar
💎
👋

z zeekay

💎
👋
View GitHub Profile
@zeekay
zeekay / .pythonrc
Last active December 18, 2015 14:09
My Pythonrc.
from __future__ import print_function
import os
import sys
# version check
version = 'pypy' if 'PyPy' in sys.version else 'py2' if sys.version_info[0] == 2 else 'py3'
django = ipython = False
# ipython check
@zeekay
zeekay / func-name.coffee
Last active December 17, 2015 17:28
Get containing function's name.
require('source-map-support').install handleUncaughtExceptions: false
constructorRegex = /^new /
nameRegex = /at (.*) \(/
objectRegex = /^Object\./
log = (message) ->
line = (new Error()).stack.split('\n')[2]
name = (nameRegex.exec line)[1].replace objectRegex, ''
@zeekay
zeekay / .gitconfig
Last active December 17, 2015 07:09
My gitconfig
[user]
email = [email protected]
name = Zach Kelling
[github]
user = zeekay
[alias]
br = branch
ci = commit
require 'formula'
class ClangCustom < Formula
homepage 'http://llvm.org/'
url 'http://llvm.org/releases/3.2/clang-3.2.src.tar.gz'
sha1 'b0515298c4088aa294edc08806bd671f8819f870'
head 'http://llvm.org/git/clang.git'
end
@zeekay
zeekay / ab.rb
Last active December 10, 2015 03:38
require 'formula'
class Ab < Formula
homepage 'http://httpd.apache.org/docs/trunk/programs/ab.html'
url 'http://www.apache.org/dist/httpd/httpd-2.4.3.tar.bz2'
sha1 '0ef1281bb758add937efe61c345287be2f27f662'
def install
# Mountain Lion requires this to be set, as otherwise libtool complains
# about being "unable to infer tagged configuration"
diff '--exclude=*.orig' -urN vim73.orig/runtime/doc/eval.txt vim73/runtime/doc/eval.txt
--- vim73.orig/runtime/doc/eval.txt 2012-10-28 16:12:39.459967383 -0500
+++ vim73/runtime/doc/eval.txt 2012-10-28 16:13:18.210484532 -0500
@@ -6272,8 +6272,8 @@
keymap Compiled with 'keymap' support.
langmap Compiled with 'langmap' support.
libcall Compiled with |libcall()| support.
-linebreak Compiled with 'linebreak', 'breakat' and 'showbreak'
- support.
+linebreak Compiled with 'linebreak', 'breakat', 'showbreak' and
@zeekay
zeekay / private.xml
Created December 25, 2012 18:10
KeyRemap4MacBook config mapping capslock to escape (control when used as a modifier).
<?xml version="1.0"?>
<root>
<item>
<name>F19 to Control_L</name>
<appendix>(+ When you type F19 only, send Escape)</appendix>
<!-- Note: identifier has "jis_" prefix for compatibility. -->
<identifier>private.controlL2controlL_escape</identifier>
<autogen>--KeyOverlaidModifier-- KeyCode::F19, KeyCode::CONTROL_L, KeyCode::ESCAPE</autogen>
</item>
</root>
function npm-name-check() {
res="`curl https://npmjs.org/package/$1 -sI | grep 404`"
if [ -z "$res" ]; then
echo awws
else
echo get dat shit
fi
}
class AsyncBase
constructor: ->
@_queue = []
@_result = null
_add: (fn, args) ->
@_queue.push [fn, args]
end: (callback) ->
result = null
require 'formula'
class MacvimCustom < Formula
homepage 'http://code.google.com/p/macvim/'
head 'https://github.com/b4winckler/macvim.git', :branch => 'master'
option "custom-icons", "Try to generate custom document icons"
option "override-system-vim", "Override system vim"
option "with-cscope", "Build with Cscope support"
option "with-lua", "Build with Lua scripting support"