Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
Feel free to email to me.

Satoshi Ohmori sachin21

💭
Feel free to email to me.
View GitHub Profile
@sachin21
sachin21 / pork_don.md
Last active Dec 6, 2018
アプリコットジャム豚丼
View pork_don.md

2食分豚丼

レシピ

  • 豚: 400g
  • 玉ねぎ: 一個
  • みりん: お玉一杯
  • 日本酒: お玉一杯
  • 醤油: お玉一杯
  • 杏じゃむ(アプリコット): お玉一杯
  • にんにくみじん切り: 一欠片
@sachin21
sachin21 / ime
Last active Feb 9, 2018
Start Google IME Server for SKK
View ime
#!/usr/bin/env zsh
eval "$(rbenv init - zsh)"
istart() {
echo "Starting Google IME Server for SKK..."
nohup rbenv exec google-ime-skk -p 5511 -h '0.0.0.0' &> /tmp/GOOGLE_IME_LOG &
ps aux | fgrep google-ime-skk | fgrep -v grep | awk '{print $2}' > /tmp/GOOGLE_IME_PID
}
View step.rb
[14] pry(main)> 1.0.step(2, 0.1).to_a
=> [1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7000000000000002, 1.8, 1.9, 2.0]
@sachin21
sachin21 / keybase.md
Created Jan 21, 2018
Keybase - Public key crypto for everyone, publicly auditable proofs of identity.
View keybase.md

Keybase proof

I hereby claim:

  • I am sachin21 on github.
  • I am sachin21 (https://keybase.io/sachin21) on keybase.
  • I have a public key ASBITpm71lF-8pxvZC_845E5bUu4fM93cs4LyX88UATJKAo

To claim this, I am signing this object:

View fizz_buzz_solver.rb
require 'singleton'
class FizzBuzzSolver
include Singleton
FIZZ = 3
BUZZ = 5
def run(numbers)
answer = solve(numbers)
@sachin21
sachin21 / benchmark.rb
Created Apr 15, 2017
Faker VS FFaker benchmarks
View benchmark.rb
require 'benchmark/ips'
require 'faker'
require 'ffaker'
Benchmark.ips do |x|
x.report('faker') { Faker::Name.name }
x.report('ffaker') { FFaker::Name.name }
x.compare!
@sachin21
sachin21 / gist:8439c47258435c7bc2c93936851ee1ec
Created Jan 4, 2017
twitter-textの方のtld_lib.ymlを取ってくると上のgemよりdirectoryがないためエラーになってる
View gist:8439c47258435c7bc2c93936851ee1ec
/home/sachin21dev/.rbenv/versions/2.3.1/lib/ruby/2.3.0/psych.rb:471:in `initialize': No such file or directory @ rb_sysopen - /home/sachin21dev/Projects/github.com/mikutter/mikutter/vendor/bundle/ruby/2.3.0/gems/twitter-text-1.14.3/lib/assets/tld_lib.yml (Errno::ENOENT)
from /home/sachin21dev/.rbenv/versions/2.3.1/lib/ruby/2.3.0/psych.rb:471:in `open'
from /home/sachin21dev/.rbenv/versions/2.3.1/lib/ruby/2.3.0/psych.rb:471:in `load_file'
from /home/sachin21dev/Projects/github.com/mikutter/mikutter/vendor/bundle/ruby/2.3.0/gems/twitter-text-1.14.3/lib/twitter-text/regex.rb:29:in `<class:Regex>'
from /home/sachin21dev/Projects/github.com/mikutter/mikutter/vendor/bundle/ruby/2.3.0/gems/twitter-text-1.14.3/lib/twitter-text/regex.rb:8:in `<module:Twitter>'
from /home/sachin21dev/Projects/github.com/mikutter/mikutter/vendor/bundle/ruby/2.3.0/gems/twitter-text-1.14.3/lib/twitter-text/regex.rb:3:in `<top (required)>'
from /home/sachin21dev/Projects/github.com/mikutter/m
@sachin21
sachin21 / .hyper.js
Created Dec 3, 2016
A Hyper's configuration file
View .hyper.js
module.exports = {
config: {
// default font size in pixels for all tabs
fontSize: 15,
// font family with optional fallbacks
fontFamily: 'ricty',
// terminal cursor background color and opacity (hex, rgb, hsl, hsv, hwb or cmyk)
cursorColor: 'rgba(248,28,229,0.75)',
@sachin21
sachin21 / laco.rb
Created Oct 12, 2016 — forked from toshia/laco.rb
らこらこらこ〜するmikutterプラグイン
View laco.rb
Plugin.create :laco do
command(:laco,
name: 'らこらこらこ〜w',
condition: lambda{ |opt| true },
visible: true,
role: :timeline) do |opt|
Service.primary.update(message: "らこらこらこ〜w")
end
end
@sachin21
sachin21 / mikutter
Last active Nov 9, 2016
mikutter startup script
View mikutter
#!/usr/bin/env zsh
eval "$(rbenv init - zsh)"
export MIKUTTER=$HOME/Projects/github.com/mikutter/mikutter
mstart() {
echo "Starting mikutter..."
ruby $MIKUTTER/mikutter.rb &> /tmp/MIKU_LOG &
ps aux | fgrep mikutter.rb | fgrep -v grep | awk '{print $2}' > /tmp/MIKU_PID