Skip to content

Instantly share code, notes, and snippets.

Avatar

Andrew Hay Kurtz ahk

  • Penumbra
  • Oakland, CA
View GitHub Profile
View gist:d45a73a52580654e049b8743d3edeb22
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 Nov 20, 2012
scipy, homebrew python2.7.3
View gist:4119439
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 Sep 18, 2012
Do ruby strings leak timing info when comparing with == ?
View gist:3740530
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 Aug 1, 2012
my edit included
View gist:3224336
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 Jul 19, 2012
panda create a new encoding
View gist:3147357
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 Jun 19, 2012
should reload chrome every 5 seconds ...
View gist:2955524
on idle
tell application "Google Chrome" to tell the active tab of its first window
reload
end tell
return 5
end idle
View gist:1976602
set nocompatible
call pathogen#infect()
set number
set ruler
syntax on
" Set encoding
set encoding=utf-8
View gist:1976600
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>
View gist:1224540
-- 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
View gist:1224537
$ cabal-dev install
cabal: supercollider-test.cabal:51: Construct not supported at this position:
F 51 "build-depends" "base>=4"