The following config let you use Ctrl+F to maximuze tmux panel. And Ctrl+F again to go back
bind -n C-f resize-pane -Z
| var R = require('ramda'); | |
| R.compose( | |
| R.apply(R.add), | |
| R.ap([R.add(3), R.multiply(100)]) | |
| )([5]); // 508 | |
| // applyMerge2 :: (a -> b) -> (a -> b) -> (b -> c) -> ([a] -> c) | |
| var applyMerge2 = function(f1, f2, fmerge) { |
| /* | |
| * Provide the implementations for 3 `add` functions to output the same value as commented | |
| * without using if-else or switch-case | |
| */ | |
| var num = 1; | |
| var add = function(n) { | |
| // to implement | |
| }; | |
| var addNum = add(num); | |
| addNum(2); |
| var mongo = require('mongodb'); | |
| var config = { | |
| host: 'localhost', | |
| port: '27017', | |
| db: 'local', | |
| }; | |
| var getDBAsync = function(config) { | |
| return new Promise(function(resolve, reject) { |
| var R = require('ramda'); | |
| // Int -> Int | |
| var nextRandomInt = R.pipe(R.converge(R.multiply, [R.identity, Math.random]), Math.floor); | |
| // nextRandomInt(2) | |
| // => 1 | |
| // nextRandomInt(2) | |
| // => 0 |
| function zipObject() { | |
| // write your code | |
| } | |
| zipObject('f')(1); | |
| // => { f: 1 } | |
| zipObject('method', 'url')('GET', 'https://api.github.com/users') | |
| // => { method: 'GET', url: 'https://api.github.com/users' } |
The following config let you use Ctrl+F to maximuze tmux panel. And Ctrl+F again to go back
bind -n C-f resize-pane -Z
For zsh user, a useful shortcut for ls is alt + l. If you prefer using ls -l, you can find the configuration at ~/.oh-my-zsh/lib/key-bindings.zsh
With the following config, you can list your files and clear the screen by alt + l and alt + c without pressing Enter key!
bindkey -s '\el' 'ls -l\n' # [Esc-l] - run command: ls
bindkey -s '\ec' 'clear\n' # [Esc-c] - run command: clear
| module['exports'] = function echoHttp (hook) { | |
| hook.debug("Debug messages are sent to the debug console"); | |
| hook.debug(hook.params); | |
| hook.debug(hook.req.path); | |
| hook.debug(hook.req.method); | |
| ``` | |
| "gulp-requirejs": "https://github.com/zhangchiqing/gulp-requirejs/tarball/master", | |
| ``` |
| /* | |
| * Easing Functions - inspired from http://gizma.com/easing/ | |
| * only considering the t value for the range [0, 1] => [0, 1] | |
| */ | |
| EasingFunctions = { | |
| // no easing, no acceleration | |
| linear: function (t) { return t }, | |
| // accelerating from zero velocity | |
| easeInQuad: function (t) { return t*t }, | |
| // decelerating to zero velocity |