Skip to content

Instantly share code, notes, and snippets.

Mark Steward marksteward

Block or report user

Report or block marksteward

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View EV certs with n SANs.sql
certwatch=> select id, no_of_certs_issued, name from ca where id in (select distinct ca_id from ca_trust_purpose ctp, trust_purpose tp where tp.purpose = 'EV Server Authentication' and ctp.trust_purpose_id = tp.id) order by 2 desc;
id | no_of_certs_issued | name
--------+--------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1582 | 43052791 | C=GB, ST=Greater Manchester, L=Salford, O=COMODO CA Limited, CN=COMODO ECC Domain Validation Secure Server CA 2
...
797 | 970183 | C=US, ST=Arizona
View VLCWinCompile.md

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

View django.txt
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:
View m_japanese.wnry.html
私のコンピュータに何が起こったのですか?
重要なファイルは暗号化されています。
文書、写真、ビデオ、データベース、およびその他のファイルの多くは、暗号化されているためアクセスできなくなりました。 たぶんあなたはファイルを回復する方法を探していますが、時間を無駄にすることはありません。 誰も私たちの解読サービスなしであなたのファイルを回復することはできません。
 
ファイルを回復できますか?
確かに。 すべてのファイルを安全かつ簡単に復元できることを保証します。 しかし、十分に時間がありません。
あなたは無料でいくつかのファイルを解読することができます。 <Decrypt>をクリックして今すぐ試してください。
しかし、すべてのファイルを解読したい場合は、支払う必要があります。
お支払いを送信するのに3日しかかかりません。 その後、価格は倍になります。
また、7日間で支払いを行わないと、ファイルを永久に回復することはできません。
@marksteward
marksteward / strace.log
Created Dec 28, 2016
Strace of BashOnWindows#1549
View strace.log
$ 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
@marksteward
marksteward / strace.log
Created Nov 26, 2016
Strace of BashOnWindows#1420
View strace.log
$ 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
View test.js
{
"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"
}
View gist:d71bd76dc09d14b151e4
“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 Apr 8, 2014
Doskey-like autocomplete
View .bashrc
# 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'
View swap.sh
#!/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
You can’t perform that action at this time.