Skip to content

Instantly share code, notes, and snippets.

@asm256
asm256 / gm_xpath.js
Last active August 29, 2015 14:04
portable gm_xpath
//@original https://github.com/scriptish/scriptish/blob/master/extension/modules/api/sandboxScripts.js
// を元にchrome上で動く用に改変
//@howto https://github.com/scriptish/scriptish/wiki/GM_xpath
//require https://gist.github.com/54a5327db50607678b62.txt
//頭に@つけてuser.jsに書くと楽
if(typeof(GM_xpath) != "function"){
function GM_xpath(details) {
var contextNode, contextDocument, paths, resolver, namespace, result,path;
@asm256
asm256 / makebme.rb
Last active August 29, 2015 14:07
data.csv 2 7keybms
#1小節 = 4beat
#160bpm -> 40小節/min
# 60*4 / 160 で1小節あたりの秒数がとれる
# = 1.5s
#1beat = 0.375s
require 'csv'
require 'rational'
#ここ適宜書き換え
#魔法のヒカリは160bpm
@asm256
asm256 / quote_paste.patch
Last active August 29, 2015 14:08
引用符付き貼付け
diff --git a/chaika/chrome/content/chaika/post/quote_paste.js b/chaika/chrome/content/chaika/post/quote_paste.js
new file mode 100644
index 0000000..3d83a96
--- /dev/null
+++ b/chaika/chrome/content/chaika/post/quote_paste.js
@@ -0,0 +1,13 @@
+//コレ参照してるコードが他にないような気がする
+Components.utils.import("resource://chaika-modules/ChaikaClipboard.js");
+
+function quotation_paste_txt(){
@asm256
asm256 / smart_handle
Created November 16, 2014 12:18
smart_handle
struct HANDLE_deleter
{
typedef HANDLE pointer;
void operator () (HANDLE handle)
{
CloseHandle(handle);
}
};
@asm256
asm256 / motihakobijizou.cpp
Created November 20, 2014 09:43
持ち運び地蔵
#include "stdafx.h"
#include "..\commonLib\PEHeader.h"
#include "..\JG2toys\jg2.h"
extern "C"
__declspec(dllexport) bool CheckVersion(const BYTE hash[16], LPCWSTR inipath)
{
return memcmp(v12md5, hash, 16) == 0;
}
void __stdcall jizou(LPDWORD mode){
@asm256
asm256 / NarouScavenger.user.js
Last active August 29, 2015 14:17
なろうの閲覧履歴から削除された小説の手がかりを探す
// ==UserScript==
// @name NarouScavenger
// @namespace @asm__
// @description 削除された小説の情報を探す
// @include http://yomou.syosetu.com/rireki/list/
// @include http://noc.syosetu.com/rireki/list/
// @include http://mnlt.syosetu.com/rireki/list/
// @version 1.02
// @grant none
// @require https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js
@asm256
asm256 / otf-noEmbed.map
Created April 13, 2015 04:22
noEmbed(Kozuka)
% TEXT, 90JIS
hminl-h H !KozMinPr6N-Regular
hminl-v V !KozMinPr6N-Regular
hminr-h H !KozMinPr6N-Regular
hminr-v V !KozMinPr6N-Regular
hminb-h H !KozMinPr6N-Regular,Bold
hminb-v V !KozMinPr6N-Regular,Bold
hgothr-h H !KozGoPr6N-Medium
hgothr-v V !KozGoPr6N-Medium
@asm256
asm256 / bootstrap.ps1
Last active September 11, 2015 13:30
Generic CM3D2 Plugin Network Build&Install Script
$build_base = 'https://gist.github.com/asm256/ed75d84a9e89802821f8/raw/'
$build_script = 'build.ps1'
$build_lib = 'build_lib.ps1'
$web = new-object net.webclient
[Text.Encoding]::UTF8.GetString($web.DownloadData("$build_base$build_lib")) | iex
(WebDownloadString $web "$build_base$build_script")| iex
@asm256
asm256 / CM3D2.CharacterShot.Plugin.cs
Last active September 11, 2015 14:12
CM3D2.CharacterShot.Plugin
// == Compile Options ==
// csc /t:library /lib:..\CM3D2x64_Data\Managed /r:UnityEngine.dll /r:UnityInjector.dll /r:Assembly-CSharp.dll CM3D2.CharacterShot.Plugin.cs
// @AB_addarg /lib:%managed%
// @AB_addarg /r:UnityEngine.dll
// @AB_addarg /r:UnityInjector.dll
// @AB_addarg /r:Assembly-CSharp.dll
// @AB_install %uinjector%
// ==/Compile Options ==
// == History ==
@asm256
asm256 / CM3D2.ConsoleCodePage.Plugin.cs
Last active September 21, 2015 14:38
コンソールの文字化けを直すUnityInjectorプラグイン
//@powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((new-object net.webclient).DownloadString('https://gist.githubusercontent.com/asm256/9bfb88336a1433e2328a/raw/bootstrap.ps1'))"
/*
コンソールの文字化けを直すUnityInjectorプラグイン
必要なもの
.net Framework 3.5
ビルド方法
CM3D2_KAIZOU\UnityInjector\ 内に保存して
C:\Windows\Microsoft.NET\Framework\v3.5\csc /t:library /lib:..\CM3D2x64_Data\Managed /r:UnityEngine.dll /r:UnityInjector.dll /unsafe CM3D2.ConsoleCodePage.Plugin.cs
でビルド
*/