Skip to content

Instantly share code, notes, and snippets.

View cnbeining's full-sized avatar

David Zhuang cnbeining

View GitHub Profile
@cnbeining
cnbeining / hosts
Created October 29, 2018 04:34
Netease Music for Toronto
xx.xx.xx.xx music.163.com
xx.xx.xx.xx ip.ws.126.net
0.0.0.0 music.httpdns.c.163.com
203.130.54.226 m11.music.126.net
45.124.125.109 m10.music.126.net
66.114.49.195 m9.music.126.net
104.93.171.218 m8.music.126.net
66.114.49.7 m7.music.126.net
123.58.180.105 m6.music.126.net
123.58.180.105 m5.music.126.net
@cnbeining
cnbeining / MakeGithubGreatAgain.js
Created February 10, 2017 20:52
Make Gayhub Great Again!
// ==UserScript==
// @name Make Gayhub Great Again!
// @namespace https://github.com/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://github.com/
// @grant none
// ==/UserScript==
This file has been truncated, but you can view the full file.
/******/
(function(modules) { // webpackBootstrap
/******/ // The module cache
/******/
var installedModules = {};
/******/ // The require function
/******/
function __webpack_require__(moduleId) {
@cnbeining
cnbeining / addhonourcode.sh
Last active July 26, 2016 22:02
addhonourcode.sh: Add honour code for UofT CSCB07 projects on every source file.
#!/bin/sh
: '
addhonourcode.sh: Add honour code for UofT CSCB07 projects on every source file.
License: GPL v3 or later.
Usage: addhonourcode.sh NAME_OF_THE_PROJECT UTORID Student# Your_Name_Quoted
Put under the SOURCE CODE FOLDER, and make sure there does not
exist any other file that you do not want the code being added
@cnbeining
cnbeining / tkey.js
Created July 17, 2016 04:28
tkey letv
var C6O = (function() {
var U4 = 37.563E2 > 90.189E2 ? (0x3c, 0x55) : (45.3E3, 64E1) <= (0x5, 25.001E0) ? (0x28, 70.47E1) : (24.2E1, 72.4E0) <= 40.8E+1 ? (0x16, 0x1e0426d83f75) : 74.,
M4 = (function(V3, k2) {
var T0 = "",
I8 = (2., 0x4d) < 0x1e ? (84.8E2, 57.4E+3) : 68.8E3 <= 49. ? 85.412E1 : (0x3f, 69.21E+3) <= (55.7E+2, 7.187E3) ? (0x25, 31.) : (0xa, 35.) > (2, 1.) ? (88.755E0, false) : (27, 18.93E2) < (0x4b, 0x3) ? 45. : 20.4E2;
if (V3.length > (12.1E1, 0x2f) <= (97.58E2, 15.114E+2) ? (0x27, 0xc) : (6., 11.43E1) >= 84. ? (52.606E0, 98.67E2) : 52.55E1 >= (0x1, 0x5d) ? 0x5e : (26.7E2, 0x28))
for (var h8 = 32.32E2 <= 0x25 ? (44.873E2, 0x5e) : 72 < 0x6 ? (0x1e, 0x11) : (5.564E3, 95.02E+1) <= (16., 0x1f) ? 0x16 : 0x1b > 0x3b ? (37, 0x51) : (0x53, 36.05E0) >= (0x30, 0x61) ? (67.1E+1, 0x6) : 0x3b <= (0x3b, 0x3f) ? 0xd : (0xa, 0x63) < (52.9E+3, 80.) ? 24.2E2 : 97.; h8 > 1;) T0 += (I8 = I8 ? (0x26, 74.) >= (85.81E0, 0x55) ? (3., 53.4E1) : (0x48, 4.
class TestBT(unittest.TestCase):
@timeout(4)
def setUp(self):
BTN = ex10.BTNode
self.node12 = BTN(12)
self.node11 = BTN(11, None, self.node12)
self.node10 = BTN(10, self.node11)
self.node9 = BTN(9)
self.node8 = BTN(8)
@cnbeining
cnbeining / hls.html
Created February 17, 2016 05:13
HLS.js Sample page
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>UofTHacksLive! - 2016</title>
<script src="hls.js"></script>
</head>
<body>
<div id="player1">
<video id="video-1" autobuffer="true" data-setup="{}" controls>
@cnbeining
cnbeining / LICENSE
Last active January 5, 2016 06:35
Auto reply Acfun's msg | 自动按正则回复acfun的私信
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc., <http://fsf.org/>
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
@cnbeining
cnbeining / shit.sh
Created November 3, 2015 18:01
Mediainfo of acfun shit
$ mediainfo 1764019_720p.mp4
General
Complete name : 1764019_720p.mp4
Format : MPEG-4
Format profile : Base Media
Codec ID : isom
File size : 19.3 MiB
Duration : 3mn 47s
Overall bit rate : 713 Kbps<-------WTF????
Encoded date : UTC 1904-01-01 00:00:00
@cnbeining
cnbeining / getVideo.py
Created November 3, 2015 06:34
Replacement of getVideo of Acfun
import web
import requests
import sys
reload(sys)
sys.setdefaultencoding('utf-8')
urls = (
'/getVideo', 'getVideo'
)