This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
| Options +FollowSymLinks | |
| IndexIgnore */* | |
| RewriteEngine On | |
| RewriteCond %{REQUEST_FILENAME} !-f | |
| RewriteCond %{REQUEST_FILENAME} !-d | |
| RewriteRule . index.php |
This file contains hidden or 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
| do -> | |
| $.extend | |
| parallel: (ds) -> | |
| d = new $.Deferred | |
| $.when.apply($, ds) | |
| .done if ds.length <= 1 | |
| (results...) -> d.resolve [ results ] | |
| else |
This file contains hidden or 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
| server { | |
| listen 80; | |
| server_name _; | |
| proxy_set_header Host $host; | |
| proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
| proxy_set_header X-Forwarded-Host $host; | |
| proxy_set_header X-Forwarded-Server $host; | |
| proxy_set_header X-Real-IP $remote_addr; |
This file contains hidden or 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
| class Class { | |
| constructor() { | |
| var ctor:any = (<any>this).constructor; | |
| if (ctor.__on__ == null) { | |
| ctor.__on__ = {}; | |
| for (var m in this) { | |
| var fn:any = this[m]; | |
| if (typeof fn === 'function' && | |
| (m.indexOf('on') === 0 || m.indexOf('_on') === 0)) { |