Skip to content

Instantly share code, notes, and snippets.

View jixunmoe's full-sized avatar
🎳
Having Fun

Jixun Wu jixunmoe

🎳
Having Fun
View GitHub Profile
@jixunmoe
jixunmoe / bind.gen.without.ctx.js
Last active July 6, 2017 12:27
[ES6] Bind generator without context.
/**
* Bind generator with context preserved.
* @param {Generator} fn The generator
* @return {Generator} Generator with arguments bind.
*/
var _bind = function (fn) {
var args = [].slice.call(arguments, 1);
return function * () {
var ir = fn.apply (this, args.concat.apply(args, arguments));
var n;
@jixunmoe
jixunmoe / autokun.js
Last active August 29, 2015 14:15
llpractice.autokun.js
(function (window, document) {
if (!window.ga) window.ga = function () {};
function getContent (url, cbSuccess, cbFail) {
var req = new XMLHttpRequest();
req.open ('GET', url);
req.onload = cbSuccess && cbSuccess.bind(req);
req.onerror = cbFail && cbFail .bind(req);
req.send ();
};
@jixunmoe
jixunmoe / FakeLib.cpp
Last active September 1, 2015 17:50
NT88 Fake Lib.
// FakeLib.cpp : Defines the exported functions for the DLL application.
//
 
#include <windows.h>
#include "FakeLib.h"
 
int __stdcall _NT3DESCBCDecrypt(char* vi, char* pDataBuffer, int length)
{
    return 0;
}
@jixunmoe
jixunmoe / NT88.asm
Created September 1, 2015 17:53
NT88 library in assembly.
format PE GUI 4.0 DLL
entry DllMain
include 'win32ax.inc'
 
section '.text' code readable executable
 
; 入口函数
proc DllMain hinstDLL,fdwReason,lpvReserved
  mov al, 1
  ret
@jixunmoe
jixunmoe / typecho.gist.js
Last active September 2, 2015 21:06
Gist Support for Typecho (Modern browser only)
/*! MIT License: (C)opyright Jixun<http://jixun.org/> */
// Usage:
// gist:JixunMoe/cd168a63b7c5a1cc3d93
(function (window, document) {
addEventListener('DOMContentLoaded', main, false);
function createGistLink (gist) {
return create('a', {
href: 'https://gist.github.com/' + gist,
@jixunmoe
jixunmoe / Simple Ajax.js
Last active September 4, 2015 22:38
簡單 Ajax 函式庫,不需要 jQuery
// 简易 Ajax 函数
// MIT License, Jixun.Moe
(function (global) {
var _export = {
ajax: $ajax,
post: $post,
get: $get
};
@jixunmoe
jixunmoe / 1A2B_bot.py
Last active September 28, 2015 22:47
An IRC bot that does nothing but a simple 1A2B game.
import socket
import random
import sys
import re
server = "irc.freenode.net" # Server
channel = "#cs-york-dev2" # Channel
botnick = "game_1A2B" # Your bots nick
# Convert string to bytes
@jixunmoe
jixunmoe / README.md
Created October 5, 2015 09:06
Check https on sites
@jixunmoe
jixunmoe / README.MD
Last active July 22, 2016 19:21
Merge ntr-cfw screenshots

NTR CFW 截图合并脚本

合并 NTR CFW 在 3DS 截图产生的 top_xxxx.bmpbot_xxxx.bmp 至一个文件。

详细阅读:Jixun.Moe

使用前提

控制台/终端 执行 convert -version 能输出 ImageMagick 的信息。

如果没有,请:

  • Windows 用户请执行 SET "PATH=DIR_TO_IMAGEMAGICK;%PATH%"
@jixunmoe
jixunmoe / 04,AB68.s
Last active August 8, 2016 16:59
Contra Chinese Translation Assembly Code.
; ROM 位置: 012B78 (04:AB68)
; 原始函数: LoadNextChar
; LoadNextChar (01180D / 04:97FD): JMP AB68
.org $AB68
; LoadNextChar
; 04,AB68
; byte[0043] 等待帧数, 如果不是 0 则跳出