Skip to content

Instantly share code, notes, and snippets.

View myokoym's full-sized avatar
💭
hi

Masafumi Yokoyama myokoym

💭
hi
View GitHub Profile
@myokoym
myokoym / text.lua
Created January 10, 2020 17:44
novel game sample for Love2D
module("GameText", package.seeall)
require "libs.object"
local utf8 = require("utf8")
new = function()
local obj = {}
local x = 0
local y = room_height
local line_margin = 2
local line_width = 5
@myokoym
myokoym / part-of-zshrc
Last active February 23, 2018 02:08
Zsh×pecoの設定(history、ghq、cdr) feat. [.zshrcを晒す - Qiita](https://qiita.com/reireias/items/60ee9934fb1f5d94f125#peco)
# cdr
if [[ -n $(echo ${^fpath}/chpwd_recent_dirs(N)) && -n $(echo ${^fpath}/cdr(N)) ]]; then
autoload -Uz chpwd_recent_dirs cdr add-zsh-hook
add-zsh-hook chpwd chpwd_recent_dirs
zstyle ':completion:*' recent-dirs-insert both
zstyle ':chpwd:*' recent-dirs-default true
zstyle ':chpwd:*' recent-dirs-max 1000
zstyle ':chpwd:*' recent-dirs-file "$HOME/.cache/chpwd-recent-dirs"
fi
" ----------------------------------------------------
" dein.vim
" ----------------------------------------------------
" プラグインが実際にインストールされるディレクトリ
let s:dein_dir = expand('~/.vim/dein')
" dein.vim 本体
let s:dein_repo_dir = s:dein_dir . '/repos/github.com/Shougo/dein.vim'
" dein.vim がなければ github から落としてくる
if &runtimepath !~# '/dein.vim'
ghq get sambatriste/sql-formatter
echo 'alias -g SQLF="| java -jar ~/.ghq/github.com/sambatriste/sql-formatter/binary/sql-formatter-1.0.0-jar-with-dependencies.jar"' >> ~/.zshrc
import times
echo getLocalTime(getTime())
{.passC: gorge("pkg-config --cflags groonga").}
{.passL: gorge("pkg-config --libs groonga").}
proc version(): cstring {.header: "<groonga/groonga.h>", importc: "grn_get_version"}
proc package_label(): cstring {.header: "<groonga/groonga.h>", importc: "grn_get_package_label"}
@myokoym
myokoym / benchmark-same-all.log
Last active February 15, 2018 11:11
[観察日記 2018-02-14 - なるせにっき](http://naruse.hateblo.jp/entry/2018/02/14/221859) 「配列の全ての要素が等しいか否か」のベンチマークスクリプトと結果
% ruby -v benchmark-same-all.rb
ruby 2.5.0p0 (2017-12-25 revision 61468) [x86_64-linux]
["a","a",...] user system total real
all? 0.490852 0.000000 0.490852 ( 0.492231)
uniq.size 0.249663 0.039904 0.289567 ( 0.290653)
lazy cnt 0.387460 0.000005 0.387465 ( 0.388847)
lazy t2cnt 0.409444 0.000000 0.409444 ( 0.410681)
each_cons 1.134791 0.000000 1.134791 ( 1.137745)
lazy one? 0.394611 0.000000 0.394611 ( 0.395936)
rotate 0.023589 0.011946 0.035535 ( 0.035795)
@myokoym
myokoym / aozorasearch.xml
Last active February 8, 2018 05:47
A Firefox search plugin for Aozorasearch 青空文庫検索 http://myokoym.net/aozorasearch/ AMO: https://addons.mozilla.org/ja/firefox/addon/aozorasearch/
<?xml version="1.0" encoding="UTF-8"?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
<ShortName>Aozorasearch</ShortName>
<LongName>Aozorasearch 青空文庫全文検索</LongName>
<Description>Search Aozorasearch</Description>
<InputEncoding>UTF-8</InputEncoding>
<Image width="16" height="16">data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABjAAD/YwAA/2MAAP9jAAD/YwAA/2MAAP9jAAD/YwAA/2MAAP9jAAD/YwAA/2MAAP9jAAD/YwAA/2MAAP9jAAD/YwAA/2MAAP9jAAD/YwAA/2MAAP9jAAD/YwAA/2UNDf92Q0P/eUxM/2sdHf9iAAD/YwAA/2MAAP9jAAD/YwAA/2MAAP9jAAD/YwAA/2MAAP9jAAD/ZAQE/46Tk/+t+/r/rv/+/67//v+v//7/nL69/20lJf9jAAD/YwAA/2MAAP9jAAD/YwAA/2MAAP9jAAD/YgAA/5u/vv+u//7/rv/+/67//v+u//7/rv/+/67//v+p7u7/bCQj/2MAAP9jAAD/YwAA/2QAAP81AAD/ZQAA/4RkZP+b4+L/YYyM/6z49/+u//7/rv/+/7D//v+KyMj/rv/+/5m1tP9iAAD/YwAA/2MAAP9lAAD/X19f/35/f/99e3v/pKOj/7a2tv+JiIj/eouL/3qKiv+Ag4P/W3V0/67//v+v//7/Zw4O/2MAAP9jAAD/ZgAA/4WIiP/////////////////MzMz//////////////////////2SHhv+u//7/rv/+/3AsLP9jAAD/YwAA/2YA
まとめ > [1] この機能は Firefox 47 から使用できますが設定項目 dom.details_element.enabled で制御しており、Nightly および Aurora バージョンを除き既定値は false です。 (バグ 1241750)。Firefox 49.0 より、この機能がデフォルトで有効になります。すなわち、設定項目の既定値が true になります (バグ 1226455)。
Click Here!

[詳細はWebで!](https://developer.mozilla.org/ja/docs/Web/HTML/Element/details#Browser_compatibility)

class Board
def initialize
@board = [
0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,
0x40, 0x22, 0x23, 0x24, 0x25, 0x28, 0x25, 0x24, 0x23, 0x22, 0x40,
0x40, 0x00, 0x27, 0x00, 0x00, 0x00, 0x00, 0x00, 0x26, 0x00, 0x40,
0x40, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x40,
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40,
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40,
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40,
@myokoym
myokoym / repos
Last active January 15, 2016 07:59
ab-default-search
achook
alertinvalidaddresses
always-default-client
alwayssendlater
attachment-encoding-localized-autodetect
auto-password-registerer
auto-search-folder
autodecodeuri
autopermission