This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ARGS = build clean pack start test | |
MAKECMDGOALS ?= clean | |
$(ARGS): | |
npm run $(MAKECMDGOALS) | |
.PHONY: $(ARGS) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 依赖pycrypto库 | |
import binascii | |
import struct | |
import base64 | |
import json | |
import os | |
from Crypto.Cipher import AES | |
def dump(file_path): | |
core_key = binascii.a2b_hex("687A4852416D736F356B496E62617857") | |
meta_key = binascii.a2b_hex("2331346C6A6B5F215C5D2630553C2728") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void function (global, factory) { | |
'use strict'; | |
// module identifier | |
var identifier = 'identifier'; | |
// module exportation | |
if (typeof define === 'function' && define.amd) { | |
// AMD module | |
define([], factory); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
((global, factory) => { | |
'use strict'; | |
// module identifier | |
const identifier = 'identifier'; | |
// module exportation | |
if (typeof define === 'function' && define.amd) { | |
// AMD module | |
define([], factory); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
pushd $(dirname $0) > /dev/null; CURRABSPATH=$(readlink -nf "$(pwd)"); popd > /dev/null; # Get the directory in which the script resides | |
set -x | |
MUSLPKG="musl:musl.tgz:http://www.musl-libc.org/releases/musl-1.1.4.tar.gz" | |
LEVTPKG="libevent:libevent2.tgz:https://cloud.github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz" | |
TMUXPKG="tmux:tmux.tgz:http://iweb.dl.sourceforge.net/project/tmux/tmux/tmux-1.9/tmux-1.9a.tar.gz" | |
NCRSPKG="ncurses:ncurses.tgz:http://ftp.gnu.org/pub/gnu/ncurses/ncurses-5.9.tar.gz" | |
TEMPDIR="$CURRABSPATH/tmp" | |
TMPLIB="tempinstall/lib" | |
TMPINC="tempinstall/include" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Exceptions | |
# Throw some errors with one line of lambda | |
# using the generator objects' throw method | |
_ERROR = lambda _ = "": (_ for _ in ()).throw(AssertionError("Some Error Occured" + _.__str__())) | |
_ERROR = lambda _ = "": (lambda:(yield _))().throw(AssertionError("Some Error Occured" + _.__str__())) | |
# So that you can do this | |
a = b if c else _ERROR() |