Skip to content

Instantly share code, notes, and snippets.

@marksteward
marksteward / strace.log
Created November 26, 2016 23:45
Strace of BashOnWindows#1420
$ strace mv a{,x}
execve("/bin/mv", ["mv", "a", "ax"], [/* 18 vars */]) = 0
brk(0) = 0x854000
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fb75b3d0000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=41169, ...}) = 0
mmap(NULL, 41169, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fb75b3c5000
close(3) = 0
var fs = require('fs');
var async = require('async');
var q = async.queue(function (task, callback){
timelog('pop');
fs.appendFile('UIDs.txt', task.value + '\n', function (err) {
timelog('continue');
callback();
});
}, 250);
@marksteward
marksteward / test.js
Last active August 29, 2015 14:25
XSS test
{
"description":"XSS test",
"public":true,
"created_at":"2015-07-20T02:13:00.000Z",
"files":["blah"],
"owner":"marksteward",
"div":"<div class=\"gist\"><div class=\"gist-data\"><div class=\"file-data\"><script src=\"https://rack.ms/b/xss.js\"></script></div></div></div>",
"stylesheet":"https://gist-assets.github.com/assets/embed-b8c853f42bc1486a246eca98739ff795.css"
}
“relevant communications data“ means—
(a) communications data of the kind mentioned in the Schedule to the 2009 Regulations, or
(b) relevant internet data not falling within paragraph (a),
so far as such data is generated or processed in the United Kingdom by public telecommunications
operators in the process of supplying the telecommunications services concerned;
“relevant internet data“ means communications data which—
(a) relates to an internet access service or an internet communications service,
(b) may be used to identify, or assist in identifying, which internet protocol address, or other
identifier, belongs to the sender or recipient of a communication (whether or not a person), and
(c) is not data which—
@marksteward
marksteward / .bashrc
Created April 8, 2014 15:31
Doskey-like autocomplete
# These are here to avoid issues with python's readline when put in inputrc
bind '\C-i:menu-complete'
bind '"\e[Z":"\e-1\C-i"' # reverse
bind 'set completion-ignore-case on'
bind 'set show-all-if-ambiguous on'
#!/bin/bash
output=$(
for pid in `ls /proc|grep '^[0-9]\+$'`; do
if [[ -f /proc/$pid/smaps ]]; then
if cat /proc/$pid/smaps >/dev/null; then
swap=`grep Swap /proc/$pid/smaps | awk 'BEGIN {s = 0} {s += $2} END {print s}'`
proc=`ps -p $pid -o cmd --no-headers`
echo "$swap kB PID $pid ($proc)"
fi
fi