Skip to content

Instantly share code, notes, and snippets.


David Wong mimoo

View GitHub Profile
mimoo / gist:9907534
Last active August 29, 2015 13:57
Select closest word to cursor in textarea (like ctrl+D in sublime text)
View gist:9907534
var textarea = textarea
// detect dots and comas
function trimtrim (truc) {
truc = $.trim(truc)
truc = truc.replace(/\./, "");
truc = truc.replace(/\,/, "");
truc = truc.replace(/\;/, "");
return truc
mimoo / gist:9907585
Created April 1, 2014 04:15
trouver des synonymes en donnant un mot
View gist:9907585
import urllib2
import sys
import re
req = urllib2.Request('' + sys.argv[1])
res = urllib2.urlopen(req)
data =
m = re.findall(r"/synonymie/(\w+)/", data)
mimoo / mp3
Created April 19, 2014 17:18
get list of mp3s from
View mp3
import urllib2
import sys
import re
truc = re.sub(r" ", "_", sys.argv[1])
req = urllib2.Request('' + truc + '.html')
res = urllib2.urlopen(req)
data =
m = re.findall(ur"(http.*\.mp3)\"", data)
mimoo /
Last active September 7, 2019 11:11
encrypt with AES in python using pycrypto lib
import argparse, os, sys
from Crypto.Cipher import AES
from Crypto.Hash import HMAC
from Crypto.Protocol.KDF import PBKDF2
# check arguments
parser = argparse.ArgumentParser()
parser.add_argument("file", help="the file we want to encrypt/decrypt")
parser.add_argument("key", help="your key")
View gist:06d5317610f0a9c34cad
(require 'package)
;; melpa !!
(add-to-list 'package-archives
'("melpa" . "") t)
(add-to-list 'package-archives
'("marmalade" .
;; C indent style is better like this
(setq c-default-style "linux"
c-basic-offset 4)
View gist:e46bd37114954383be3e
### Keybase proof
I hereby claim:
* I am mimoo on github.
* I am mimoo ( on keybase.
* I have a public key whose fingerprint is C11E D67D E493 0E15 DEAD 2474 9A84 B86A EEB7 278E
To claim this, I am signing this object:
mimoo / gist:c7c184bef5cd9f9d908a
Last active August 29, 2015 14:12
RSS Feed with CodeIgniter + Twig
View gist:c7c184bef5cd9f9d908a
<?xml version="1.0"?>
<rss version="2.0">
<title>your title</title>
<description>your description</description>
mimoo / py2pdf
Created March 7, 2015 16:40
python source code printed to pdf file
View py2pdf
vim -c ":hardcopy >" -c ":q"
ps2pdf abc.pdf
mimoo / plaidctf.sage
Last active May 2, 2016 10:34
View plaidctf.sage
# plaid ctf triplets
data = [
[0xfd2066554e7f2005082570ddf50e535f956679bf5611a11eb1734268ffe32eb0f2fc0f105dd117d9d739767f300918a67dd97f52a3985483aca8aa54998a5c475842a16f2a022a3f5c389a70faeaf0500fa2d906537802ee2088a83f068aba828cc24cc83acc74f04b59a0764de7b64c82f469db4fecd71876eb6021090c7981, 0xa23ac312c144ce829c251457b81d60171161655744b2755af9b2bd6b70923456a02116b54136e848eb19756c89c4c46f229926a48d5ac030415ef40f3ea185446fa15b5b5f11f2ec2f0f971394e285054182d77490dc2e7352d7e9f72ce25793a154939721b6a2fa176087125ee4f0c3fb6ec7a9fdb15510c97bd3783e998719, 0x593c561db9a04917e6992328d1ecadf22aefe0741e5d9abbbc12d5b6f9485a1f3f1bb7c010b19907fe7bdecb7dbc2d6f5e9b350270002e23bd7ae2b298e06ada5f4caa1f5233f33969075c5c2798a98dd2fd57646ad906797b9e1ce77194791d3d0b097de31f135ba2dc7323deb5c1adabcf625d97a7bd84cdf96417f05269f4],
mimoo /
Last active November 29, 2015 02:55


I don't believe in awkwardness.

-Oscar Carlos (a friend)

Do I not destroy my enemies when I make them my friends?