Skip to content

Instantly share code, notes, and snippets.

@matlink
matlink / sort.sh
Last active February 15, 2018 16:24
Sort by 3rd column, numerically
sort -nk3,3
@matlink
matlink / ranks.sh
Created February 14, 2018 15:57
print rank of input words
awk '{ print NR, $0 }'
@matlink
matlink / iterate.py
Created February 14, 2018 09:57
iterate over lines
with open(filename) as _buffer:
for word in _buffer:
word = word.rstrip('\r\n')
@matlink
matlink / aspell.sh
Created February 13, 2018 18:44
convert aspell dict to list of words
aspell -d fr dump master | aspell -l fr expand > my.dict
@matlink
matlink / print sum of 2nd column.sh
Last active March 5, 2018 16:17
print sum of 2nd column
awk '{ SUM += $2 } END { print SUM }'
defutf8 on
bell_msg ""
vbell off
shell /bin/bash
shelltitle '$ |bash'
startup_message off
hardstatus on
hardstatus lastline
hardstatus string "screen@%H"
caption always
@matlink
matlink / cve_2016_0728.c
Last active December 3, 2018 00:10 — forked from PerceptionPointTeam/cve_2016_0728.c
cve_2016_0728 exploit
/* $ gcc cve_2016_0728.c -o cve_2016_0728 -lkeyutils -Wall */
/* $ ./cve_2016_072 PP_KEY */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <keyutils.h>
#include <unistd.h>
#include <time.h>
### Keybase proof
I hereby claim:
* I am matlink on github.
* I am matlink (https://keybase.io/matlink) on keybase.
* I have a public key whose fingerprint is DB73 EE70 4B7A FEEB 86BF 595E 8219 5833 186B B3CA
To claim this, I am signing this object: