Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View okuramasafumi's full-sized avatar
:octocat:
Hire me!

OKURA Masafumi okuramasafumi

:octocat:
Hire me!
View GitHub Profile
@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
def give_ujihisa_money(users, value)
# users[:ujihisa][:money] = 24
update_in2(-> { users[:ujihisa][:money] }, 24)
# put_in(users[:ujihisa][:money], 24)
# dig <-> bury
end
def update_in2(f, value)
pp RubyVM::InstructionSequence.of(f).to_a
nil
@jamieparfet
jamieparfet / macOS-mojave-iso.sh
Last active February 11, 2023 19:16
Create an ISO from the mojave installer app
#!/bin/bash
# This assumes that the ~6GB mojave installer is in the /Applications folder.
# If it's not, just open the App Store, search Mojave, and you can download the installer file from there.
hdiutil create -o /tmp/mojave.cdr -size 6g -layout SPUD -fs HFS+J
hdiutil attach /tmp/mojave.cdr.dmg -noverify -mountpoint /Volumes/install_mojave
sudo /Applications/Install\ macOS\ mojave.app/Contents/Resources/createinstallmedia --volume /Volumes/install_mojave
mv /tmp/mojave.cdr.dmg ~/Desktop/InstallSystem.dmg
hdiutil detach /Volumes/Install\ macOS\ mojave
@antifuchs
antifuchs / iterm2_zsh_init.zsh
Last active July 15, 2022 15:15
tmux-enabled iterm2 shell integration for zsh.
if [[ -o login ]]; then
TMUX_PREFIX=""
if [[ ! -z "$TMUX" ]] ; then
# Via
# <http://blog.yjl.im/2014/12/passing-escape-codes-for-changing-font.html>:
TMUX_PREFIX='\ePtmux;\e'
TMUX_POSTFIX='\e\\'
fi
# Indicates start of command output. Runs just before command executes.
@rxaviers
rxaviers / gist:7360908
Last active April 23, 2024 07:02
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@shunirr
shunirr / README.md
Created August 30, 2012 04:07 — forked from laiso/README
Jenkins をOS X のログインユーザー権限のデーモンで自動起動しておく設定

Jenkins をOS X のログインユーザー権限のデーモンで自動起動しておく設定

必要なもの

うっかり jenkins.pkg を入れてしまった人はアンインストールする

@rf-
rf- / validator.rb
Created April 6, 2012 19:57
Demonstrate validation of arbitrary fields (e.g., hstore)
#!/usr/bin/env ruby
require 'active_record'
ActiveRecord::Base.establish_connection(
:adapter => 'sqlite3',
:database => ':memory:'
)
ActiveRecord::Schema.define do