Skip to content

Instantly share code, notes, and snippets.

View 3846masa's full-sized avatar

Masahiro Miyashiro (3846masa) 3846masa

View GitHub Profile
<%
var position = (config.position || '')[0] || 'tb';
delete config.position;
-%>
\begin{figure}[<%= position %>]
\centering
\includegraphics[<%= utils.stringify(config) %>]{<%= url %>}
<% if (caption) { -%>
\caption{<%= caption.replace(/\n/g, '\\protect\\\\%\n') %>}<%= label %>
<% } -%>

Keybase proof

I hereby claim:

  • I am 3846masa on github.
  • I am 3846masa (https://keybase.io/3846masa) on keybase.
  • I have a public key whose fingerprint is 827D 460E F1F7 A2C6 D043 AFB4 0B80 0405 FDDA 4B34

To claim this, I am signing this object:

pre>code{display:block;overflow-x:auto;padding:0.5em;color:#333 !important;background:#f8f8f8 !important;}
@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
@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
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 / 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));
@3846masa
3846masa / test.js
Last active July 5, 2016 11:33
Chromeの限界
var func = () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () => () =>
@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 / 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
}