Skip to content

Instantly share code, notes, and snippets.

@l4u
l4u / gist:6067576
Last active December 20, 2015 03:59
KeyRemap4MacBook private.xml JIS_Yen to Fn Key
<root>
<item>
<name>JIS_YEN to Fn</name>
<identifier>private.jis_key_to_fn</identifier>
<autogen>--KeyToKey-- KeyCode::JIS_YEN, KeyCode::FN</autogen>
</item>
</root>
@l4u
l4u / gist:6120633
Created July 31, 2013 09:18
open external links in a new window coffeescript turbolinks
$(document).on 'page:load', ->
links = document.links
for link in links
if (link.hostname != window.location.hostname)
link.target = '_blank'
@l4u
l4u / gist:6120634
Created July 31, 2013 09:18
open external links in a new window coffeescript turbolinks
$(document).on 'page:load', ->
links = document.links
for link in links
if (link.hostname != window.location.hostname)
link.target = '_blank'
while (dispatch_semaphore_wait(sema, DISPATCH_TIME_NOW))
[[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode
beforeDate:[NSDate dateWithTimeIntervalSinceNow:2]];
Pod::Spec.new do |s|
s.name = 'MagicalRecord'
s.version = '2.3.beta'
s.license = 'MIT'
s.summary = 'Super Awesome Easy Fetching for Core Data 1!!!11!!!!1!.'
s.homepage = 'http://github.com/magicalpanda/MagicalRecord'
s.author = { 'Saul Mora' => '[email protected]' }
s.source = { :git => 'https://github.com/magicalpanda/MagicalRecord.git',:commit => 'b49f29d36e25dd40068a263635c3f8d120636076' }
s.description = 'Handy fetching, threading and data import helpers to make Core Data a little easier to use.'
s.source_files = 'MagicalRecord/**/*.{h,m}'
@l4u
l4u / gist:7885389
Last active December 30, 2015 21:09
json.extract! @model, :id, :url, :created_at, :updated_at
json.set! :id, @model.to_param
Pod::Spec.new do |s|
s.name = 'WatchSend'
s.version = '0.0.1'
s.platform = :ios
s.source = { :git => '???'}
s.source_files = '*.{h}'
s.vendored_libraries = 'libWatchsend.a'
s.preserve_paths = 'libWatchsend.a'
s.frameworks = 'QuartzCore', 'CoreGraphics', 'SystemConfiguration', 'OpenGLES'
s.library = 'Watchsend', 'icucore'
nums = [0,9].repeated_permutation(18).map(&:join).map(&:to_i)
nums.shift
n = gets.to_i
1.upto n do
j = gets.to_i
nums.each do |i|
if i % j == 0
puts i
break
end
[martini] Completed 200 OK in 135.28us
[martini] Started GET /
[martini] Completed 200 OK in 83.209us
Cleaning up children
Killing child's pgid: 40740
bin/start-servers: killing child 40743
Traceback (most recent call last):
File "test/harness", line 113, in <module>
main()
File "test/harness", line 110, in main
@l4u
l4u / gist:10943483
Created April 16, 2014 23:59
haskell js
http://elm-lang.org
http://haste-lang.org
https://github.com/faylang/fay
https://uu-computerscience.github.io/uhc-js/
https://github.com/ghcjs/ghcjs