Skip to content

Instantly share code, notes, and snippets.

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);
#!/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
@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'
“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 / 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"
}
@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
@marksteward
marksteward / strace.log
Created December 28, 2016 14:55
Strace of BashOnWindows#1549
$ cat socket-test.py
from socket import *
s = socket(AF_INET, SOCK_STREAM)
s.bind(('127.1.1.1', 7821))
s.listen(1)
s2 = socket(AF_INET, SOCK_STREAM)
s2.bind(('127.1.1.2', 7821))
s2.listen(1)
$ strace python socket-test.py
私のコンピュータに何が起こったのですか?
重要なファイルは暗号化されています。
文書、写真、ビデオ、データベース、およびその他のファイルの多くは、暗号化されているためアクセスできなくなりました。 たぶんあなたはファイルを回復する方法を探していますが、時間を無駄にすることはありません。 誰も私たちの解読サービスなしであなたのファイルを回復することはできません。
 
ファイルを回復できますか?
確かに。 すべてのファイルを安全かつ簡単に復元できることを保証します。 しかし、十分に時間がありません。
あなたは無料でいくつかのファイルを解読することができます。 <Decrypt>をクリックして今すぐ試してください。
しかし、すべてのファイルを解読したい場合は、支払う必要があります。
お支払いを送信するのに3日しかかかりません。 その後、価格は倍になります。
また、7日間で支払いを行わないと、ファイルを永久に回復することはできません。
First time:
mkdir -p ~/git/polls
cd ~/git/polls
virtualenv -p python3.4 django-polls
source django-polls/bin/activate
pip install django
Subsequent times:

Compile for Windows (64bit)

Pull the VideoLAN Docker container and run it in interactive mode with bash:

docker pull registry.videolan.org:5000/vlc-debian-win64
docker run -v ~/docker:/root/shared -it registry.videolan.org:5000/vlc-debian-win64 /bin/bash

Clone the VLC git