Skip to content

Instantly share code, notes, and snippets.

View mexelout's full-sized avatar
💤
zzz

mexelout mexelout

💤
zzz
View GitHub Profile
@mexelout
mexelout / main.js
Created October 5, 2017 20:52
javascript game
window.onload = function() {
var canvas = document.createElement('canvas');
canvas.width = 640;
canvas.height = 480;
document.body.appendChild(canvas);
var context = canvas.getContext('2d');
var player = Object();
var obstacles = [Object(), Object(), Object()];
@mexelout
mexelout / tmux.conf
Last active March 22, 2021 12:36
tmux configuration
set -g prefix C-t
unbind C-b
set -sg escape-time 0
set -g base-index 1
setw -g pane-base-index 1
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
bind C-h select-pane -L
@mexelout
mexelout / file0.txt
Last active September 18, 2018 01:11
ActiveSupportのtryメソッド ref: https://qiita.com/mexelout/items/567a55108155230d9337
Hoge.first.try(:name)
# => メソッドや変数の呼び出しで、objがnilでも例外を発生させずに通れる
@mexelout
mexelout / rails_helper.rb
Created May 20, 2019 17:25
wait_for関係
# デフォでコメントアウトされてるの外すだけ
Dir[Rails.root.join('spec', 'support', '**', '*.rb')].each { |f| require f }
RSpec.configure do |config|
config.include WaitFor
end