Skip to content

Instantly share code, notes, and snippets.

View nmai's full-sized avatar

Nick nmai

  • San Francisco Bay Area
View GitHub Profile
@nmai
nmai / windows 10 pro essentials.md
Created June 3, 2021 19:43
helpful tools for devs / powerusers operating in WIN10 env

General:

  • QL-Win - QuickLook for Windows. Press spacebar while browsing files to view a preview of the current highlighted file. Supports loads of media types, zip file structure preview, text formats, csv as tables, etc.
  • PowerToys - Utilities for Windows 10 Helpful set of utilities most people find themselves wishing they had at one point or another
    • PowerRename: rename multiple files at once by simple string matching or regex
    • ColorPicker: like the mac utility
    • FancyZones: Customizable windows snapping and resizing
    • Keyboard Manager: Remap keys.. e.g. change caps lock to ctrl.

Technical:

@nmai
nmai / initialization-time.csv
Created April 26, 2020 08:19
Standalone initialization-time csv
Firefox VPN ExpressVPN
Cold start 1.7s 1.8s
Switching while live 5.7s 10.1s
@nmai
nmai / simplified-bandwidth.csv
Last active April 26, 2020 07:46
Standalone bandwidth speed csv
Country / Region Download (Firefox) Upload (Firefox) Download (Express) Upload (Express)
US (West) 108 214 53 134
US (South) 49 187 19 41
US (Midwest) 18 423 37 61
US (East) 74 119 21 14
Canada 4 119 51 129
Hong Kong 28 72 135 101
UK 2 73 52 84
Sweden 5 104 1 108
Brazil 52 95 11 39
@nmai
nmai / global-speeds.csv
Last active September 22, 2020 22:20
Mozilla VPN vs ExpressVPN: Speed test results comparing Firefox Private Network VPN with ExpressVPN in a few different cities worldwide. Bandwidth speeds in megabits/s, latency in ms. Tested with 2 providers: M-Lab's google "speed test" widget, and Fast.com by Netflix. "simplified-bandwidth.csv" is the averaged results between those 2 providers.
We can make this file beautiful and searchable if this error is corrected: It looks like row 10 should actually have 13 columns, instead of 10. in line 9.
VPN,City,Country,Down (M-Lab),Up (M-Lab),Latency (M-Lab),Server (M-Lab),Down (FAST.com),Up (FAST.com),Unloaded Latency,Loaded Latency,Server (FAST.com),Notes
Firefox,Montreal,Canada,2.70,139.8,83,"New York, NY",5.2,99,90,104,"Secaucus, US | Ashburn, US",""
Express,Montreal,Canada,94.9,147.7,88,Montreal,7.1,110,114,135,"Ashburn, US | Newark, US | London, GB",""
Firefox,Hong Kong,China,33.4,44,159,Hong Kong,22,100,159,167,"Tsuen Wan, HK | Singapore, SG",""
Express,Hong Kong,China,40.1,12.1,210,Hong Kong,230,190,161,317,"Tsuen Wan, HK | Seattle, US",""
Firefox,London,United Kingdom,2.35,82,141,London,2.1,64,147,151,"Stockholm, SE | Amsterdam, NL",""
Express,London,United Kingdom,67.7,77.7,141,London,36,90,143,160,"London, GB | Secaucus, US",""
Firefox,Stockholm,Sweden,4.07,50.8,214,Stockholm,5.4,53,173,175,"Stockholm, SE | Amsterdam, NL",""
Express,Stockholm,Sweden,0.40,55,195,Stockholm,1.6,160,172,530,"Stockholm, SE | Amsterdam, NL",""
Firefox,Sao Paulo,Brazil,76.6,96.2,187,Sao Paulo,27,93,18
const foo = await obs$.pipe(take(1)).toPromise()
@nmai
nmai / IFCONFIG_BASH_SB.txt
Last active November 10, 2016 06:02
WSL network enumeration debugging stuff. Machine info: Surface Book running Win 10 fast ring, build 14965.rs_prelease.161104-1700
$ ifconfig
eth1 Link encap:Ethernet HWaddr xx:xx:xx:xx:xx:xx
inet addr:192.168.56.1 Bcast:192.168.56.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
lo Link encap:Local Loopback
@nmai
nmai / Example Rx Sockets.js
Last active January 25, 2016 01:13
Observable stream w/ websockets or socket.io? notes
// An example from the discussion here: https://github.com/Reactive-Extensions/RxJS/issues/112
var WebSocketServer = require('websocket').server;
var http = require('http');
var server = http.createServer(function(request, response) {
console.log((new Date()) + ' Received request for ' + request.url);
response.writeHead(404);
response.end();
});
@nmai
nmai / ArraySortPipe.js
Created January 23, 2016 11:22
Transforms arrays with ordering by date
/* Posted by @nmai
* Original credits go to Vlado Tesanovic
*
* See his Stack Overflow answer + Plunkr example at
* -> http://stackoverflow.com/a/34528168/1146881
*
* Example usage, sorting by the "date" property:
* <li *ngFor="#item of array | arraySort:'-date'">{{item.name}} {{item.date | date:'medium' }}</li>
*
* Change the direction by using + instead of - in the arraySort arguments
@nmai
nmai / Package Control.sublime-settings
Last active November 29, 2015 01:38
A couple ST3 config files I currently use
{
"bootstrapped": true,
"in_process_packages":
[
],
"installed_packages":
[
"Colorsublime",
"EJS",
"Git",
@nmai
nmai / iconMonster.js
Last active September 25, 2020 13:49 — forked from illmat/iconMonster.js
Downloads all IconMonstr.com SVG files. Works, but may take some time to complete. About 15% of the SVG icons cannot be retrieved through their previews so the script must download them individually.
var casper = require('casper').create({
verbose: true,
logLevevel: 'debug',
pageSettings: {
webSecurityEnabled: false
}
});;
var fs = require('fs');
var pages = [];