Skip to content

Instantly share code, notes, and snippets.

Masafumi Yokoyama myokoym

Block or report user

Report or block myokoym

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
myokoym / text.lua
Created Jan 10, 2020
novel game sample for Love2D
View text.lua
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 / part-of-zshrc
Last active Feb 23, 2018
Zsh×pecoの設定(history、ghq、cdr) feat. [.zshrcを晒す - Qiita](
View part-of-zshrc
# 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"
View part-of-vimrc-for-dein-vim.vim
" ----------------------------------------------------
" dein.vim
" ----------------------------------------------------
" プラグインが実際にインストールされるディレクトリ
let s:dein_dir = expand('~/.vim/dein')
" dein.vim 本体
let s:dein_repo_dir = s:dein_dir . '/repos/'
" dein.vim がなければ github から落としてくる
if &runtimepath !~# '/dein.vim'
ghq get sambatriste/sql-formatter
echo 'alias -g SQLF="| java -jar ~/.ghq/"' >> ~/.zshrc
View niroonga.nim
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 / benchmark-same-all.log
Last active Feb 15, 2018
[観察日記 2018-02-14 - なるせにっき]( 「配列の全ての要素が等しいか否か」のベンチマークスクリプトと結果
View benchmark-same-all.log
% 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)
View aozorasearch.xml
<?xml version="1.0" encoding="UTF-8"?>
<OpenSearchDescription xmlns="">
<LongName>Aozorasearch 青空文庫全文検索</LongName>
<Description>Search Aozorasearch</Description>
<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!


View shogi-board.rb
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,
View repos
You can’t perform that action at this time.