Skip to content

Instantly share code, notes, and snippets.

Bùi Thành Nhân nhanb

Block or report user

Report or block nhanb

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
nhanb / wrapka.js
Last active Mar 6, 2018
Kissmanga unobfuscated wrapKA() function
View wrapka.js
// Works with
var input = 'mqE5Ec6bMuj1NMBmDOpSx0VBunV1Woj3jJ9/6VAhx6+El9bfvbhuRNIsjbkRWuvXrFTfCgZukx+MAHwkMN5VGolvTK/P24u4BOECXcLudQtgHLD5SKtSKHQeH1cthYMiOP40YKbPD0CtxpIVhCphdMpArArqhVFwdixEO/B+aIQAjHY355p+8AVwWvuSj6qSN79mBQ9ATkzCDvLdi0Y4V9yManh6/gbY/jSVZnvmJqAjgqRNUbTKrpkw90aReGYY';
var iv = CryptoJS.enc.Hex.parse('a5e8e2e9c2721be0a84ad660c472c1f3');
var key = CryptoJS.SHA256("034nsdfns72nasdasd");
var r20 = CryptoJS.lib.CipherParams.create({
ciphertext: CryptoJS.enc.Base64.parse(input)
nhanb / terminalrc
Last active Aug 28, 2015
My xfce4-terminal's terminalrc using Solarized Dark. Note that the `ColorCursor=` fixes the bug where the character under cursor is illegible if it has the same color as the cursor.
View terminalrc
FontName=DejaVu Sans Mono for Powerline 10
View 0001-add-j-to-WordBreakSyms.patch
From d976a64f560510125bfddf02bd892d42bc94e5b5 Mon Sep 17 00:00:00 2001
From: nhanb <>
Date: Thu, 29 Jan 2015 21:42:52 +0700
Subject: [PATCH] add 'j' to WordBreakSyms
I type in VNI style so `j` doesn't need to be processed by unikey at
all. Making `j` a WordBreakSym prevents unikey from hijacking my `jj`
keymap in vim.
src/unikey-im.cpp | 2 +-
View postmkvirtualenv
#!/usr/bin/env bash
# This hook is sourced after a new virtualenv is activated.
# Automatically create symlink to project-specific virtualenv hook
if [[ -e "$hook" ]]; then
rm -f $VIRTUAL_ENV/bin/postactivate
ln -s $hook $VIRTUAL_ENV/bin/postactivate
View config.cfg
bind "TAB" "+showscores"
bind "ENTER" "+attack"
bind "ESCAPE" "cancelselect"
bind "SPACE" "+jump"
bind "'" "+moveup"
bind "+" "sizeup"
bind "," "buyammo1"
bind "-" "sizedown"
bind "." "buyammo2"
nhanb / typewriter.js
Last active Aug 29, 2015
Typewriter effect in plain javascript
View typewriter.js
* content: string to be "typed out"
* el: parent element to write content in
* delay: miliseconds between each char
* Example usage:
* typewriter("Look ma, no hands!", document.getElementById("container"), 100);
var typewriter = function(content, el, delay) {
var p = document.createElement('p');
import os
import urllib
from google.appengine.datastore.datastore_query import Cursor
import jinja2
import webapp2
import datetime
from google.appengine.ext import ndb
def toFullwidth(halfwidth):
# Only convert these characters
en_chars = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!"#$%&()*+,-./:;<=>?@[\\]^_`{|}~'
def shift(char):
return unichr(0XFEE0 + ord(c)) if char in en_chars else char
return u''.join([shift(c) for c in halfwidth])
nhanb /
Last active Aug 29, 2015
clean up non-ascii characters
# Run this in _posts, obviously
files=`find . -name "*.mkd"`
for file in $files; do
sed -i 's/–/-/g' $file
sed -i 's/ / /g' $file
sed -i "s/’/'/g" $file
sed -i "s/‘/'/g" $file
sed -i 's/“/"/g' $file
sed -i 's/”/"/g' $file
sed -i 's/…/.../g' $file
nhanb /
Created Apr 2, 2014
Scrape RMIT courses
from bs4 import BeautifulSoup as bs
import re
import json
import requests
# the "Cookie" header when requesting start_page
start_page_cookie = 'rmit_logout=1....'
# "Cookie" header when requesting sth like
detail_page_cookie = ''
You can’t perform that action at this time.