Skip to content

Instantly share code, notes, and snippets.

View ahk's full-sized avatar

Andrew Hay Kurtz ahk

  • Penumbra
  • Oakland, CA
View GitHub Profile
http://localhost:8080/mapbox-gl-js/example/geojson-markers/
http://localhost:8080/mapbox-gl-js/example/animate-point-along-line/
http://localhost:8080/mapbox-gl-js/example/queryrenderedfeatures/
http://localhost:8080/mapbox-gl-js/example/scroll-fly-to/
http://localhost:8080/mapbox-gl-js/example/popup-on-click/
http://localhost:8080/mapbox-gl-js/example/hover-styles/
http://localhost:8080/mapbox-gl-js/example/satellite-map/
http://localhost:8080/mapbox-gl-js/example/custom-marker-icons/
http://localhost:8080/mapbox-gl-js/example/filter-features-within-map-view/
http://localhost:8080/mapbox-gl-js/example/video-on-a-map/
@ahk
ahk / gist:4119439
Created November 20, 2012 17:29
scipy, homebrew python2.7.3
llvm-gcc: /private/var/folders/tm/5fy_bdc15tz98lv8w8q8l1zh0000gq/T/pip-build/scipy/scipy/sparse/linalg/eigen/arpack/ARPACK/FWRAPPERS/veclib_cabi_c.c
In file included from /System/Library/Frameworks/vecLib.framework/Headers/vecLib.h:43,
from /System/Library/Frameworks/Accelerate.framework/Headers/Accelerate.h:20,
from /private/var/folders/tm/5fy_bdc15tz98lv8w8q8l1zh0000gq/T/pip-build/scipy/scipy/sparse/linalg/eigen/arpack/ARPACK/FWRAPPERS/veclib_cabi_c.c:2:
/System/Library/Frameworks/vecLib.framework/Headers/vfp.h:51:23: error: immintrin.h: No such file or directory
@ahk
ahk / gist:3740530
Created September 18, 2012 00:07
Do ruby strings leak timing info when comparing with == ?
require 'benchmark'
ace1 = 'a' + ('b' * 10000)
ace2 = 'a' + ('b' * 10000)
lastace = ('b' * 10000) + 'a'
bees = 'b' * 10001
n = 10000000
Benchmark.bmbm do |x|
@ahk
ahk / gist:3224336
Created August 1, 2012 06:45
my edit included
import random
import sys
def main():
# 1. generate a random number within the range
# determined by the user
guessUpperLimit = int(raw_input("Enter the upper limit for the target number: "))
targetInt = random.randint(0, guessUpperLimit)
print "Okay, I've got my number!"
@ahk
ahk / gist:3147357
Created July 19, 2012 22:38
panda create a new encoding
encoding = Panda::Encoding.create(:video_id => 1234, :profile_id => 6789)
or
video = Panda::Video.find("123")
encoding = video.encodings.create(:profile => "profile_id")
@ahk
ahk / gist:2955524
Created June 19, 2012 17:49
should reload chrome every 5 seconds ...
on idle
tell application "Google Chrome" to tell the active tab of its first window
reload
end tell
return 5
end idle
@ahk
ahk / gist:1976602
Created March 5, 2012 04:18
~/.vimrc
set nocompatible
call pathogen#infect()
set number
set ruler
syntax on
" Set encoding
set encoding=utf-8
@ahk
ahk / gist:1976600
Created March 5, 2012 04:17
~/.gvimrc
if has("gui_macvim")
" Fullscreen takes up entire screen
set fuoptions=maxhorz,maxvert
" Command-Return for fullscreen
macmenu Window.Toggle\ Full\ Screen\ Mode key=<D-CR>
" Command-Shift-F for Ack
map <D-F> :Ack<space>
-- supercollider-test.cabal auto-generated by cabal init. For
-- additional options, see
-- http://www.haskell.org/cabal/release/cabal-latest/doc/users-guide/authors.html#pkg-descr.
-- The name of the package.
Name: supercollider-test
-- The package version. See the Haskell package versioning policy
-- (http://www.haskell.org/haskellwiki/Package_versioning_policy) for
-- standards guiding when and how versions should be incremented.
Version: 0.1
$ cabal-dev install
cabal: supercollider-test.cabal:51: Construct not supported at this position:
F 51 "build-depends" "base>=4"