Skip to content

Instantly share code, notes, and snippets.

Wei-Shao Tang (Frank Tang) pa4373

Block or report user

Report or block pa4373

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
pa4373 /
Last active Oct 19, 2019
#!/usr/bin/env python
import time
import base64
import hashlib
import urllib
import urlparse
import urllib2
import subprocess
from collections import OrderedDict
pa4373 / ptt-crawler.js
Last active Apr 30, 2016
View ptt-crawler.js
// npm i request cheerio json2csv
var fs = require('fs'),
request = require('request'),
cheerio = require('cheerio'),
json2csv = require('json2csv');
var HOST = '';
var getMenu = function (url, callback, links) {
var links = links || []; // Set default value for links (initial call)
pa4373 / emacs.el
Created Apr 24, 2015
My emacs file, just getting started!
View emacs.el
;; package.el setup and auto install on new machine
(require 'package)
(add-to-list 'package-archives
'("melpa" . "") t)
(defvar local-packages '(auto-complete gotham-theme js2-mode markdown-mode pandoc-mode exec-path-from-shell projectile epc jedi))
(defun uninstalled-packages (packages)
(delq nil
pa4373 / controller.js
Last active Aug 29, 2015
Example angular.js coding style.
View controller.js
'use strict';
* @ngdoc function
* @name ntuconnectAngularApp.controller:MeetupCtrl
* @description
* # MeetupCtrl
* Controller of the ntuconnectAngularApp
pa4373 / groups.v
Created Oct 29, 2014
Some algebra proof about Group using Coq.
View groups.v
Section Group.
Variable G : Set.
Variable op : G -> G -> G.
Infix "o" := op (at level 35, right associativity).
Axiom assoc : forall a b c : G, a o (b o c) = (a o b) o c.
Variable e : G.
Axiom unit_l : forall a : G, e o a = a.
Axiom unit_r : forall a : G, a o e = a.
Axiom inv_l : forall a : G, exists b : G, b o a = e.
pa4373 /
Created Aug 20, 2014
Bit modification concept demonstration
$ python [SEED_NUMBER]
ex: python 3923
import sys, random
message = [True, True, True, True, True, False, True, False]
carrier = [False, False, False, True, False, False, True, False, False, False, True, False, True, True, False]
#!/usr/bin/env python
import os, sys, struct
def parse_arg(argv):
if len(argv) != 2:
print 'require one argument.'
elif not 'Mach-O' in [i.rstrip() for i in os.popen('file %s' % argv[1])][0]:
print 'the argument must be Mach-O binary file.'
return argv[1]
#!/usr/bin/env python
This program simply flip cryptid to \x00, given offset.
WARNING: this will modify binary directly and without checking structure,
backup, and using with caution!
import sys, os
def parse_arg(argv):
if len(argv) != 3:
pa4373 /
Last active Aug 29, 2015
Fix chinese characters and input problem under Git Bash (MINGW32)
# Usage: $ curl -L [GIST_RAW_URL] | sh
echo "alias ls='/bin/ls --show-control-chars -F --color=tty'" >> /etc/profile
sed -i -e "s/PS1=\"\$PS1\"'\\\n'/#PS1=\"\$PS\"'\\\n'/g" /etc/profile
echo "set meta-flag on\nset input-meta on\nset output-meta on\nset convert-meta off" >> /etc/inputrc
You can’t perform that action at this time.