Skip to content

Instantly share code, notes, and snippets.

@neguse11
neguse11 / notes-unityinjector-and-component.md
Last active October 13, 2022 00:53
UnityInjectorとComponentの動作メモ

UnityInjectorの動作メモ

Unityを分かっていない人(主に筆者)向けのメモです

AddModsSliderへのプルリクエストの検討時にCM3D2-01さんから教わりました。

UnityInjectorの動作のおさらい

  • ReiPatcherでUnityInjector.Patcherを適用すると
#!/usr/bin/sudo sh
## ruby_revealer.sh -- decrypt obfuscated GHE .rb files. 2.0.0 to 2.3.1+.
## From `strings ruby_concealer.so`:
##
## > This obfuscation is intended to discourage GitHub Enterprise customers
## > from making modifications to the VM.
##
## Well, good, as long as its not intended to discourage *me* from doing this!
@Mine02C4
Mine02C4 / LightsOutAVX2.cpp
Last active September 30, 2016 18:02
情報数学概論: Intel AVX2のSIMD命令を使ったLIGHTS OUTの全探索プログラム
#include <iostream>
#include <vector>
#include <algorithm>
#include <mutex>
#define SIMD // AVX2を利用する。
//#define S64 // テーブルを64bitにする。SIZEを6以上にするために必要
#ifdef S64
typedef int64_t table;
@nyuichi
nyuichi / monadic-peg.scm
Last active August 29, 2015 14:25
peg in scheme
(import (scheme base)
(scheme write)
(gauche partcont))
(define-syntax PEG:reify
(syntax-rules ()
((_ expr)
(reset (PEG:unit expr)))))
(define (PEG:reflect x)
@qnighy
qnighy / zshrc-runtmux.sh
Created June 23, 2015 12:53
.zshrc: run tmux automatically
if [[ ! -n "${TMUX-}" ]]; then
if tmux has-session; then
tmux attach-session || exit $?
exit 0
else
tmux || exit $?
exit 0
fi
fi
@qnighy
qnighy / README.md
Last active August 29, 2015 14:23
C言語の問題

問題

以下の2つのソースコード test1.ctest2.c はどちらのほうが速いか、コードを見て予想せよ。

ただし、条件は以下のようにする:

gcc -O2 test1.c -o test1
gcc -O2 test2.c -o test2
time ./test1
time ./test2
@danielgtaylor
danielgtaylor / gist:0b60c2ed1f069f118562
Last active May 2, 2025 15:13
Moving to ES6 from CoffeeScript

Moving to ES6 from CoffeeScript

I fell in love with CoffeeScript a couple of years ago. Javascript has always seemed something of an interesting curiosity to me and I was happy to see the meteoric rise of Node.js, but coming from a background of Python I really preferred a cleaner syntax.

In any fast moving community it is inevitable that things will change, and so today we see a big shift toward ES6, the new version of Javascript. It incorporates a handful of the nicer features from CoffeeScript and is usable today through tools like Babel. Here are some of my thoughts and issues on moving away from CoffeeScript in favor of ES6.

While reading I suggest keeping open a tab to Babel's learning ES6 page. The examples there are great.

Punctuation

Holy punctuation, Batman! Say goodbye to your whitespace and hello to parenthesis, curly braces, and semicolons again. Even with the advanced ES6 syntax you'll find yourself writing a lot more punctuatio

@h2non
h2non / libvips-installer.sh
Last active July 25, 2024 03:38
libvips 7.42.x cross-platform simple installer script (supports OSX, Debian, Ubuntu, CentOS, Fedora, Amazon Linux)
#!/bin/sh
#
# Orinally made by Lovell Fuller for sharp
# https://github.com/lovell/sharp
#
# Usage:
# curl -s https://gist.githubusercontent.com/h2non/89bb2f87c6499d0b25f1/raw/bf3d0743107f02f5db2b93c53f7f0e07a1c33112/libvips-installer.sh | sudo bash -
#
まず、nominalな継承関係はないので、ここでの継承関係とはクラス<A>と<B>の包含関係が
A \subset B
であることします。ようするに
(instanceof? x A) => (instanceof? x B)
みたいな感じですね。これを実現するためにクラス間の継承関係を*あとづけ*できるようにします。
@bulkan
bulkan / user.js
Created January 7, 2015 22:39
Mocking Sequelize model function
var Promise = require('bluebird');
var sinon = require('sinon');
var User = require('./db/models').User;
describe('User model', function(){
var userFindStub;
var sandbox;
before(function(){
sandbox = sinon.sandbox.create();