Skip to content

Instantly share code, notes, and snippets.

### 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:
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 / 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 / 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 / ranks.sh
Created February 14, 2018 15:57
print rank of input words
awk '{ print NR, $0 }'
@matlink
matlink / sort.sh
Last active February 15, 2018 16:24
Sort by 3rd column, numerically
sort -nk3,3
@matlink
matlink / print_lower.sh
Last active February 16, 2018 09:47
print lines having 1st column lower than
NUMBER=2880000000
awk '{ if ($1 < '"$NUMBER"') {print $0} }'
@matlink
matlink / runtime.txt
Created February 16, 2018 14:29
measure run time
#include <time.h>
clock_t begin = clock();
/* here, do your time-consuming job */
clock_t end = clock();
double time_spent = (double)(end - begin) / CLOCKS_PER_SEC;
@matlink
matlink / hashcat_markov.sh
Last active February 17, 2018 13:15
hashcat use markov stat
hashcat --markov-hcstat=${FILEBASE}.hcstat2 --session=${FILEBASE} --increment --stdout -a3 -1?l?u?d ?1?1?1?1?1?1?1?1?1?1
@matlink
matlink / hashcat_crackpos.sh
Created February 17, 2018 13:18
hashcat get cracking positions
hashcat -m99999 -o ${BASENAME}.hc.ranks --outfile-format=10 --potfile-disable --markov-hcstat=${BASENAME}.hcstat2 --session=${BASENAME} --increment -a3 -1?l?u?d ${BASENAME} ?1?1?1?1?1?1?1?1?1?1