This file contains 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
cache = [ 0, 1 ] | |
fibonacci = (n) -> | |
return cache[n] if cache[n]? | |
cache[n] = fibonacci(n - 1) + fibonacci(n - 2) | |
for i in [0..10] | |
console.log i, fibonacci i |
This file contains 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
{ readdirSync, statSync, existsSync, mkdirSync } = require 'fs' | |
{ inspect } = require 'util' | |
{ resolve, dirname, filename, extname, sep, relative } = require 'path' | |
{ exec } = require 'child_process' | |
firstDirname = (filepath) -> | |
filepath.split(sep)[0] | |
mkdirRecursively = (dirStr) -> | |
cwd = '' | |
for dir in dirStr.split '/' |
This file contains 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
<?xml version="1.0"?> | |
<root> | |
<appdef> | |
<appname>ITERM2</appname> | |
<equal>com.googlecode.iterm2</equal> | |
</appdef> | |
<appdef> | |
<appname>MACVIM</appname> | |
<equal>org.vim.MacVim</equal> | |
</appdef> |
This file contains 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
{Route} = require 'chaplin' | |
console.log new Route('/home').test '/' | |
console.log new Route('/home').test '/home' | |
console.log new Route('/home').test '/abc/def' | |
console.log new Route('/.*').test '/' | |
console.log new Route('/.*').test '/abc/def' | |
console.log new Route('/:a').test '/' | |
console.log new Route('/:a').test '/abc/def' | |
console.log new Route('').test '/' | |
console.log new Route('').test '/abc/def' |
This file contains 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
$('.downloading.showbook').each(function(i,a){var map={};$(a).attr('href').match(/\?(.*)/)[1].split('&').forEach(function(kvs){var kv=kvs.split('=');map[kv[0]]=kv[1]});window.open('download.php?d='+map.d+'&f='+map.f)}) |
This file contains 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
jwPlayer.config.sources.forEach(function(source){if(source.default){window.open(source.file);return false}}) |
This file contains 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
package main | |
func main() {} |
This file contains 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 style = document.createElement('style'); | |
style.appendChild(document.createTextNode('#sample { background-color: #FF0000; }')); | |
document.documentElement.appendChild(style); | |
window.addEventListener('DOMContentLoaded', function () { | |
document.head.appendChild(style); | |
}, false); |
OlderNewer