start new:
tmux
start new with session name:
tmux new -s myname
// hey, everybody! it's a tiny Web server! | |
// instead of a bunch of foo = reqire("foo") | |
// list our required modules and loop through | |
var r = [ "fs", "http", "mime", "path", "url" ]; | |
for (var i = 0; i < r.length; i++) { | |
global[r[i]] = require(r[i]); | |
} | |
// some constants |
#!/bin/bash | |
# | |
# Watch current directory (recursively) for file changes, and execute | |
# a command when a file or directory is created, modified or deleted. | |
# | |
# Written by: Senko Rasic <senko.rasic@dobarkod.hr> | |
# | |
# Requires Linux, bash and inotifywait (from inotify-tools package). | |
# | |
# To avoid executing the command multiple times when a sequence of |
Latency Comparison Numbers (~2012) | |
---------------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns 3 us | |
Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
/** | |
* Original author: David Eads (https://github.com/eads) | |
* | |
* Wrap D3 charting components in a simple Backbone view interface | |
* | |
* Provides a redrawing path, data sync, and fallback for non-d3 browsers. | |
* | |
* Views that extend ChartView should implement their own "draw" function and go to work. | |
* | |
* var collection = new Backbone.Collection([ ["Maria", 33], ["Heather", 29] ]); |
Chose between natural mode like MacOS or Windows default mode.
You can do this by going to Start Menu, type PowerShell, and click Run as Administrator.
$mode = Read-host "How do you like your mouse scroll (0 or 1)?"; Get-PnpDevice -Class Mouse -PresentOnly -Status OK | ForEach-Object { "$($_.Name): $($_.DeviceID)"; Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Enum\$($_.DeviceID)\Device Parameters" -Name FlipFlopWheel -Value $mode; "+--- Value of FlipFlopWheel is set to " + (Get-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Enum\$($_.DeviceID)\Device Parameters").FlipFlopWheel + "`n" }