Skip to content

Instantly share code, notes, and snippets.

View nhanb's full-sized avatar

Nhân nhanb

View GitHub Profile
@nhanb
nhanb / autoexec.cfg
Created September 5, 2021 03:23
My CSGO shopping binds
bind "kp_ins" " buy vesthelm; buy vest;"
bind "kp_del" " buy defuser;"
bind "kp_leftarrow" " buy hegrenade;"
bind "kp_pgdn" " buy flashbang;"
bind "kp_5" " buy smokegrenade;"
bind "kp_end" " buy incgrenade; buy molotov;"
bind "kp_downarrow" " buy decoy;"
bind "kp_enter" "buy awp;"
bind "kp_plus" "buy m4a1; buy ak47;"
bind "kp_minus" "buy sg556; buy aug;"
@nhanb
nhanb / justinguitar.py
Last active May 24, 2018 08:01
Grabbing all lesson videos from justinguitar's beginner course
#!/usr/bin/env python
import requests
import re
from bs4 import BeautifulSoup
from subprocess import call, check_output
import string
def fetch_html(links):
@nhanb
nhanb / wrapka.js
Last active March 6, 2018 03:11
Kissmanga unobfuscated wrapKA() function
// Works with
// https://cdnjs.cloudflare.com/ajax/libs/crypto-js/3.1.9-1/crypto-js.min.js
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
nhanb / party_roles.md
Last active December 29, 2015 01:58
ITC Party assignments

Hiếu

  • Than, củi, cồn,

Trường

  • Đá
  • Li, dĩa nhựa, đũa
  • Bao tay, xiên nướng

Tuấn

  • Nước ngọt
@nhanb
nhanb / Makefile
Created November 19, 2013 15:02
quick-and-dirty makefile (I mean it)
CC = g++
FLAGS = -Iinclude -L. -ltcod -ltcodxx -Wl,-rpath=. -Wall -g
OBJS = src/*.cpp
all: $(OBJS)
$(CC) $(OBJS) -o locknchase $(FLAGS)
clean:
rm -f locknchase
run: all
./locknchase
@nhanb
nhanb / konami.js
Last active December 22, 2015 13:59
/**
* Trigger something totally inappropriate when user enters the
* right sequence of the Konami code.
*
* callback is the function you want to execute when the complete sequence
* has been entered.
*/
var konamiCode = function(callback) {
@nhanb
nhanb / rmitproxy_public.sh
Last active December 18, 2015 20:29
For RMIT proxy use. Execute this script everytime you open a new terminal.
#!/bin/bash
# =============================================================================
# If the computer is currently connected to RMIT's network then this
# script will set the appropriate proxy environment variables, otherwise
# it just unsets everything.
#
# Also includes special proxy configs for:
# - git
# - apt
import java.awt.Color;
public class MovingRectangle {
/**
* method: showAnimation
* This method shows an animation in which a rectangle moves around, inside and close to
* the edges of an open window.
* Eveytime the rectangle changes the moving direction, its color is changed
* to the next color in the specified array. If there is no more color in the array,
From d976a64f560510125bfddf02bd892d42bc94e5b5 Mon Sep 17 00:00:00 2001
From: nhanb <nhan@nerdyweekly.com>
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 +-
@nhanb
nhanb / postmkvirtualenv
Created September 22, 2014 15:03
postmkvirtualenv
#!/usr/bin/env bash
# This hook is sourced after a new virtualenv is activated.
# Automatically create symlink to project-specific virtualenv hook
hook="`pwd`/.virtualenv/postactivate"
if [[ -e "$hook" ]]; then
rm -f $VIRTUAL_ENV/bin/postactivate
ln -s $hook $VIRTUAL_ENV/bin/postactivate
fi