Skip to content

Instantly share code, notes, and snippets.

View sdstrowes's full-sized avatar

Stephen Strowes sdstrowes

View GitHub Profile
@sdstrowes
sdstrowes / gist:9763713
Created March 25, 2014 15:06
control t
sds@becomerich-lm:~$ ping -q 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 56 data bytes
^T
load: 1.23 cmd: ping 16805 running 0.00u 0.00s
2/2 packets received (100.0%) 121.688 min / 128.423 avg / 135.159 max
^T
load: 1.22 cmd: ping 16805 running 0.00u 0.00s
6/6 packets received (100.0%) 121.688 min / 172.922 avg / 235.270 max
^C
--- 8.8.8.8 ping statistics ---
sds@uist:/tmp$ valgrind --tool=massif --pages-as-heap=yes --massif-out-file=massif.out awk '!x[$0]++' blah.txt > /tmp/foo
==2388== Massif, a heap profiler
==2388== Copyright (C) 2003-2012, and GNU GPL'd, by Nicholas Nethercote
==2388== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info
==2388== Command: awk !x[$0]++ blah.txt
==2388==
==2388==
sds@uist:/tmp$ ms_print massif.out | head -30
--------------------------------------------------------------------------------
Command: awk !x[$0]++ blah.txt
@sdstrowes
sdstrowes / gist:2c1ca212265844716b56
Created June 19, 2014 04:19
valgrind on awk in seconds
sds@uist:/tmp$ valgrind --tool=massif --pages-as-heap=yes --massif-out-file=massif.out --time-unit=ms awk '!x[$0]++' blah.txt > /tmp/foo
==2429== Massif, a heap profiler
==2429== Copyright (C) 2003-2012, and GNU GPL'd, by Nicholas Nethercote
==2429== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info
==2429== Command: awk !x[$0]++ blah.txt
==2429==
==2429==
sds@uist:/tmp$ ms_print massif.out | head -30
--------------------------------------------------------------------------------
Command: awk !x[$0]++ blah.txt
### Keybase proof
I hereby claim:
* I am sdstrowes on github.
* I am sdstrowes (https://keybase.io/sdstrowes) on keybase.
* I have a public key whose fingerprint is EEB3 182E AF1F D295 0014 A074 0B19 7B8C B8A0 4218
To claim this, I am signing this object:
@sdstrowes
sdstrowes / gist:baffccfb0d51be7c3346
Created October 12, 2014 00:52
glasgow thesis modify page numbering
sds@islay:0:~/ext/Glasgow-Thesis-Template$ git diff
diff --git a/header.tex b/header.tex
index 6ed115f..6c8d5ec 100644
--- a/header.tex
+++ b/header.tex
@@ -72,7 +72,7 @@
\begin{document}
\pagestyle{empty}
-\pagenumbering{gobble}
771 6
809 v6
877 mx
962 ns
1288 imap
1334 ns1
1351 pop
1435 smtp
1861 ipv6
2105 m
1 smtp
2 ns1
2 v6
3 6
3 imap
3 pop
4 ns
6 mx
7 mail
10 ipv6
27 6
27 v6
31 mx
32 ns
34 pop
35 ns1
37 imap
56 smtp
73 ipv6
119 mail
170 6
176 v6
192 mx
200 ns
273 imap
292 pop
331 smtp
334 ns1
509 ipv6
692 m
771 6
809 v6
877 mx
962 ns
1288 imap
1334 ns1
1351 pop
1435 smtp
1861 ipv6
2105 m