Skip to content

Instantly share code, notes, and snippets.

View 3846masa's full-sized avatar

Masahiro Miyashiro (3846masa) 3846masa

View GitHub Profile
@3846masa
3846masa / opencv-ubuntu-fmscv.md
Last active October 7, 2015 09:50
Ubuntuでコンピュータビジョンを受講する人向けOpenCVインストール方法 #FMSCV

Ubuntuでコンピュータビジョンを受講する人向けOpenCVインストール方法

おれもわからん

Clang入れる

sudo apt-get install clang

おしまい

OpenCV入れる

@3846masa
3846masa / webaudio.prototype._createnode.js
Created November 15, 2015 04:32
RPGツクールMVのサンプルのバグを直す魔法
WebAudio.prototype._createNodes = function() {
var context = WebAudio._context;
this._sourceNode = context.createBufferSource();
this._sourceNode.buffer = this._buffer;
this._sourceNode.loopStart = this._loopStart;
this._sourceNode.loopEnd = this._loopStart + this._loopLength;
this._sourceNode.playbackRate.value = this._pitch;
this._gainNode = context.createGain();
this._gainNode.gain.value = isFinite(this._volume) ? this._volume : 0;
this._pannerNode = context.createPanner();
@3846masa
3846masa / apm-list
Created November 25, 2015 03:10
AtomにインストールしたPackage 2015/11/25
Built-in Atom packages (90)
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
@3846masa
3846masa / grub.cfg
Created January 17, 2016 05:03
Remix OS
# 'hd0,gptX'の部分は環境に合わせて変えること
menuentry 'Android-x86' --class android-x86 {
insmod part_gpt
insmod fat
set root='hd0,gptX'
search --file --no-floppy --set=root /system.img
linux /kernel root=/dev/ram0 androidboot.hardware=remix_x86_64 androidboot.selinux=permissive quiet DATA= CREATE_DATA_IMG=1
initrd /initrd.img
}
@3846masa
3846masa / index.js
Created June 17, 2016 01:37
requirebin sketch
var emoji = require('js-emoji-fork');
//var emoji = new Emoji();
emoji.init_unified();
console.log(emoji.rx_unified);
var str = `
こんにちは。💅🏻@3846masaです🚑。
思いつき🌽で始まったお蔵入り本🆎がまさか2冊め👨を出せる⚫とは、思っていませんでした😅。
実は🏯、今回⚫の本📖の内容📲で大人👶の都合上🚨危うく😨「お蔵入り💇🏻」しかけたもの😷もありました😅。
@3846masa
3846masa / test.js
Last active July 5, 2016 11:33
Chromeの限界
var func = () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () =>
@3846masa
3846masa / index.js
Created September 10, 2016 04:29
requirebin sketch
// Welcome! require() some modules from npm (like you were using browserify)
// and then hit Run Code to run your code on the right side.
// Modules get downloaded from browserify-cdn and bundled in your browser.
const emojione = require('emojione');
const emojiRegExp = emojione.unicodeRegexp;
console.log(emojiRegExp);
console.log("\uD83C\uDF63".match(emojiRegExp));
class LowPassFilter {
constructor(alpha) {
this.setAlpha(alpha);
this.y = null;
this.s = null;
}
setAlpha(alpha) {
if (alpha <= 0 || alpha > 1.0) {
throw new Error();
@3846masa
3846masa / docker-compose.yml
Created March 5, 2017 05:06
NX DNS switch hack
# https://github.com/obi12341/docker-unbound
unbound:
image: secns/unbound:1.6.0
ports:
- "53:53/udp"
- "53:53"
environment:
- DO_IPV6=yes
- DO_IPV4=yes
- DO_UDP=yes
@3846masa
3846masa / hsp_mosaic.hsp
Created May 16, 2017 05:10
HSP でモザイクする例
#module
#deffunc mosaic int _x1, int _y1, int _x2, int _y2, int _level
_w = _x2 - _x1 : _h = _y2 - _y1
_csel = ginfo_sel : _cx = ginfo_cx : _cy = ginfo_cy
_bw = (_w / _level) | 0x01 : _bh = (_h / _level) | 0x01
buffer 99, _bw, _bh, 0
pos 0, 0
gzoom _bw, _bh, _csel, _x1, _y1, _w, _h, 0
gsel _csel, 0