Skip to content

Instantly share code, notes, and snippets.

View nondanee's full-sized avatar
💪

Nzix nondanee

💪
  • Hangzhou, China
View GitHub Profile
@nondanee
nondanee / JumpToVote.js
Last active October 17, 2018 06:07
do tutor counselor in UESTC without mianliao app
(function JumpToVote(){
let username = "???"
let password = "???"
let xhr = new XMLHttpRequest()
xhr.onreadystatechange = function(){
if(xhr.readyState == 4 && xhr.status == 200){
let data = JSON.parse(xhr.responseText)
let token = data.response.token
let uid = data.response.uid
window.location.href = `http://dev.tjut.cc:92/?uid=${uid}&token=${token}&source=ml`
@nondanee
nondanee / gfm.css
Last active December 15, 2017 11:54
github favoured markdown style
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; font-size: 14px; line-height: 1.5; color: #24292e; background-color: #fff; }
.container { width: 980px; margin: 20px auto; }
.readme .markdown-body, .readme .plain { padding: 45px; word-wrap: break-word; background-color: #fff; border: 1px solid #ddd; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; }
.markdown-body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; font-size: 16px; line-height: 1.5; word-wrap: break-word; }
article, aside, details, figcaption, figure, footer, header, main, menu, nav, section { display: block; }
@nondanee
nondanee / select.js
Last active September 9, 2018 02:32
where to eat
const menu = [
{
name: 'YOSHINOYA 22',
weight: 4
},
{
name: 'YOSHINOYA 24',
weight: 4
},
{
@nondanee
nondanee / config.js
Last active February 13, 2022 17:30
a simple proxy server with https tunnel and basic authentication
const fs = require('fs')
/*
module.exports = {
key: fs.readFileSync('domain.key'),
cert: fs.readFileSync('fullchain.cer'),
}
*/
@nondanee
nondanee / aes_ecb_test.py
Created September 21, 2018 08:57
ecb encrypted result
# -*- coding: utf-8 -*-
from Crypto.Cipher import AES
f = open('before.bmp','rb')
bid_header = f.read(54)
raw_data = f.read()
f.close()
pad = lambda s: s + (16 - len(s) % 16) * chr(16 - len(s) % 16)
@nondanee
nondanee / weapi.pem
Created October 6, 2018 12:51
netease cloud music weapi public key
-----BEGIN PUBLIC KEY-----
MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDgtQn2JZ34ZC28NWYpAUd98iZ3
7BUrX/aKzmFbt7clFSs6sXqHauqKWqdtLkF2KexO40H1YTX8z2lSgBBOAxLsvakl
V8k4cBFK9snQXE9/DDaFt6Rr7iVZMldczhC0JNgTz+SHXT6CBHuX3e9SdB1Ua44o
ncaTWz7OBGLbCiK45wIDAQAB
-----END PUBLIC KEY-----
@nondanee
nondanee / my.ahk
Last active October 17, 2018 06:02
AutoHotKey configuration
SetStoreCapslockMode, Off
global capslock, action, click
Capslock::
SetTimer, Timeout, -300
click:=1
capslock:=1
action:=0
KeyWait, Capslock
if(!action && click){
@nondanee
nondanee / .Xmodmap
Created October 20, 2018 10:06
linux keyboard map
keycode 66 = Mode_switch Caps_Lock
keycode 25 = w W Up
keycode 38 = a A Left
keycode 39 = s S Down
keycode 40 = d D Right
@nondanee
nondanee / dns-tutorial
Created October 21, 2018 13:09
self-build dns tutorial for unblockneteasemusic
$ apt-get install dnsmasq
# /etc/dnsmasq.conf
no-resolv
no-hosts
server=119.29.29.29
addn-hosts=/etc/dnsmasq.hosts
#listen-address=127.0.0.1
# /etc/dnsmasq.hosts
@nondanee
nondanee / mysql.cnf
Last active November 8, 2018 07:08
MySQL use utf8mb4 character set
[client]
default-character-set = utf8mb4
[mysql]
default-character-set = utf8mb4
[mysqld]
character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci
init_connect = 'SET NAMES utf8mb4'