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
| L1 cache reference 0.5 ns | |
| Branch mispredict 5 ns | |
| L2 cache reference 7 ns | |
| Mutex lock/unlock 25 ns | |
| Main memory reference 100 ns | |
| Compress 1K bytes with Zippy 3,000 ns | |
| Send 2K bytes over 1 Gbps network 20,000 ns | |
| Read 1 MB sequentially from memory 250,000 ns | |
| Round trip within same datacenter 500,000 ns | |
| Disk seek 10,000,000 ns |
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 TodoController | |
| constructor: ({@context})-> | |
| @todos = [] | |
| @context.set 'todos': todos | |
| @context.addTodo = ()=> | |
| @todos.push text: @context.get('todo'), done: false | |
| @context.set 'todos', @todos | |
| @context.markDone = (todo)=> |
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
| Error: global leak detected: _xdc_ | |
| at Runner.checkGlobals (http://192.168.1.102:8000/static/js/mocha/mocha.js:3138:21) | |
| at Runner.<anonymous> (http://192.168.1.102:8000/static/js/mocha/mocha.js:3053:44) | |
| at Runner.emit (http://192.168.1.102:8000/static/js/mocha/mocha.js:235:20) | |
| at http://192.168.1.102:8000/static/js/mocha/mocha.js:3359:14 | |
| at Test.run (http://192.168.1.102:8000/static/js/mocha/mocha.js:3002:5) | |
| at Runner.runTest (http://192.168.1.102:8000/static/js/mocha/mocha.js:3304:10) | |
| at http://192.168.1.102:8000/static/js/mocha/mocha.js:3348:12 | |
| at next (http://192.168.1.102:8000/static/js/mocha/mocha.js:3232:14) | |
| at http://192.168.1.102:8000/static/js/mocha/mocha.js:3241:7 |
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
| #!/bin/bash | |
| exclude='(.dotfiles/$|.git)' | |
| # Link files | |
| find ~/.dotfiles/ -type f -name ".*" -exec ln -s -f {} --target-directory=$HOME/ \; | |
| # Copy folders | |
| find ~/.dotfiles/ -maxdepth 1 -name ".*" -type d | grep -vE $exclude | xargs -I {} cp -v -r {} $HOME |
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
| {spawn} = require 'child_process' | |
| log = (data)-> | |
| process.stdout.write data.toString() | |
| out = (obj)-> | |
| obj.stdout.on 'data', log | |
| obj.stderr.on 'data', log | |
| task 'develop', 'Run a dev server', -> |
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
| #!/usr/bin/env sh | |
| ## | |
| # This is script with usefull tips taken from: | |
| # https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
| # | |
| # install it: | |
| # curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
| # |
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
| def coroutine(func): | |
| """ | |
| A decorator that turns a function with normal input into a coroutine. | |
| This decorator takes care of priming the coroutine, doing the looping and | |
| handling the closing. | |
| The first argument of any decorated function is what was received when | |
| data was sent to the coroutine via the ``.send`` method. All the other | |
| ``*args`` and ``**kwargs`` are what was passed to the decorated function | |
| when instantiating the coroutine. |
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
| #!/bin/bash | |
| scrot '%Y-%m-%d_%H-%M-%S.png' -s -e 'scp $f leaf@leafo.net:www/shotsnb;echo -n "http://leafo.net/shotsnb/$f" | xclip; rm $f' | |
| notify-send -u normal -t 1000 'Screenshot Ready' |
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
| // @name Gumtree location folder | |
| // @description Unfold the location navigation on gumtree | |
| // @match http://www.gumtree.com/* | |
| // @run-at document-start | |
| (function() { | |
| var css, head, node; | |
| css = "#location-tree { display: block !important; } .expandable-tree {visibility: visible !important;}"; | |
| try { | |
| head = document.getElementsByTagName("head")[0]; |