Skip to content

Instantly share code, notes, and snippets.

View retrohacker's full-sized avatar

William Blankenship retrohacker

View GitHub Profile
(function () {
var e;
e = function () {
var e;
return e = $(".js-fullscreen"), e.css("height", $(window).height()), e = $(".js-min-fullscreen"), e.css("min-height", $(window).height())
}, $(function () {
return e()
})
}).call(this),
function () {
/**
* Refer to comment for description of XML file.
* This script loads in a medium size (23 GB) XML file and parses out timestamps (w/o date) as a map.
* The timestamps are the creation dates of each entity in the XML document.
*/
var cluster = require('cluster')
var queue = []
var timestampMap = {}
var threads = 11;
var needWork = []
function isDefined(result) {
if( typeof result !== "undefined" &&
typeof result["row"] !== "undefined" &&
typeof result["row"]["$"] !== "undefined" &&
typeof result["row"]["$"]["CreationDate"] !== "undefined") {
return true
} else {
return false
}
}
function isDefined(result) {
if( result!=null &&
typeof result !== "undefined" &&
typeof result["row"] !== "undefined" &&
typeof result["row"]["$"] !== "undefined" &&
typeof result["row"]["$"]["CreationDate"] !== "undefined") {
return true
} else {
return false
}
This file has been truncated, but you can view the full file.
{
"21:42:52": 200,
"22:08:08": 175,
"22:17:57": 191,
"23:33:19": 147,
"23:40:59": 145,
"23:55:37": 156,
"23:56:41": 141,
"00:42:38": 124,
"00:59:11": 108,
sudo docker images --no-trunc | grep none | awk '{print $3}' | xargs -r sudo docker rmi
@retrohacker
retrohacker / wireless.md
Created June 9, 2014 18:30
Debian Wireless

#lspci

lspci -nn

00:00.0 Host bridge [0600]: Intel Corporation Haswell-ULT DRAM Controller [8086:0a04] (rev 09)
00:02.0 VGA compatible controller [0300]: Intel Corporation Haswell-ULT Integrated Graphics Controller [8086:0a16] (rev 09)
00:03.0 Audio device [0403]: Intel Corporation Device [8086:0a0c] (rev 09)
00:14.0 USB controller [0c03]: Intel Corporation Lynx Point-LP USB xHCI HC [8086:9c31] (rev 04)
00:16.0 Communication controller [0780]: Intel Corporation Lynx Point-LP HECI #0 [8086:9c3a] (rev 04)
process.chdir(dir1)
exec("ls",function(e,stdout) {
console.log(stdout)
})
process.chdir(dir2)
@retrohacker
retrohacker / pi.text
Created June 13, 2014 05:56
First 8366 HEX digits of pi
243F6A8885A308D313198A2E03707344A4093822299F31D0082EFA98EC4E6C89
452821E638D01377BE5466CF34E90C6CC0AC29B7C97C50DD3F84D5B5B5470917
9216D5D98979FB1BD1310BA698DFB5AC2FFD72DBD01ADFB7B8E1AFED6A267E96
BA7C9045F12C7F9924A19947B3916CF70801F2E2858EFC16636920D871574E69
A458FEA3F4933D7E0D95748F728EB658718BCD5882154AEE7B54A41DC25A59B5
9C30D5392AF26013C5D1B023286085F0CA417918B8DB38EF8E79DCB0603A180E
6C9E0E8BB01E8A3ED71577C1BD314B2778AF2FDA55605C60E65525F3AA55AB94
5748986263E8144055CA396A2AAB10B6B4CC5C341141E8CEA15486AF7C72E993
B3EE1411636FBC2A2BA9C55D741831F6CE5C3E169B87931EAFD6BA336C24CF5C
7A325381289586773B8F48986B4BB9AFC4BFE81B6628219361D809CCFB21A991
var wait = require('waitgroup')
var fs = require('fs')
var wg = new wait
var list = ['file1.txt','file2.txt','file3.txt','file4.txt']
list.forEach(function(val) {
wg.add()
fs.readFile(val,{"encoding":"UTF-8"},function(e,data) {