Skip to content

Instantly share code, notes, and snippets.

View sachin21's full-sized avatar
💭
Feel free to email to me.

Satoshi Ohmori sachin21

💭
Feel free to email to me.
View GitHub Profile
@sachin21
sachin21 / gist:bb63009559c185bc8ced
Created December 31, 2014 14:01
pecoをvim bindで使う
{
"Keymap": {
"C-j": "peco.SelectPrevious",
"C-k": "peco.SelectNext",
"C-c": "peco.Cancel",
"C-j": "peco.SelectDown",
"C-k": "peco.SelectUp",
"C-f": "peco.ScrollPageDown",
"C-b": "peco.ScrollPageUp"
}
@sachin21
sachin21 / richpager
Created April 29, 2015 14:29
richpagerでのエラー
File "<stdin>", line 3
print '\n'.join(styles)
^
SyntaxError: invalid syntax
@sachin21
sachin21 / update_installing_tools
Last active January 2, 2021 14:51
個人で使ってるツールの一括アップデート
#!/usr/bin/env zsh
function update_it() {
local tool_path="$1"
local target="$2"
pushd "$tool_path" &> /dev/null
[ ! -e .git ] && echo " x [Warning] $target is not git repository" && popd &> /dev/null && return 0;
@sachin21
sachin21 / echo.sd.rb
Created January 2, 2016 11:51
echo-sd's Formula for Homebrew
class EchoSd < Formula
desc "Echo 'sudden death' message"
homepage "https://fumiyas.github.io/2013/12/25/echo-sd.sh-advent-calendar.html"
url "https://raw.githubusercontent.com/fumiyas/home-commands/master/echo-sd"
sha256 "42f333ec81642f3b6a3a5fb59ab35f526dd7c86b77cdb8a420ba73eaf3846652"
def install
bin.install "echo-sd"
end
end
@sachin21
sachin21 / agvim.fish
Created January 5, 2016 12:10
agvim for fishshell
function agvim
vim (ag $argv | peco --query "$LBUFFER" | awk -F : '{print "-c " $argv[2] " " $argv[1]}')
end
@sachin21
sachin21 / allunigem
Last active January 18, 2016 07:54
全てのgemをアンインストールする
gem list --no-versions | grep "^[a-z]" | grep bunlder -v | grep test-unit -v | grep rdoc -v | grep rake -v | grep psych -v | grep io-console -v | grep json -v | grep bigdecimal -v | grep minitest -v | xargs gem uninstall -aIx
@sachin21
sachin21 / sachin21-node-build
Last active April 19, 2023 06:28
Programming Language Installers
#!/usr/bin/env bash
set -e
for TARGET_VERSION in $@; do
if MAKE_OPTS="-j $(nproc)" MAKEOPTS="-j $(nproc)" nodenv install $TARGET_VERSION && nodenv global $TARGET_VERSION; then
npm install --global npm@latest
npm install --global neovim
@sachin21
sachin21 / mother's day.md
Last active September 26, 2016 17:24
2017年度版 母の日 プレゼント候補

候補一覧

  • 紅茶
  • マグカップ
  • 写真入りマグカップ
@sachin21
sachin21 / mikutter
Last active November 9, 2016 06:42
mikutter startup script
#!/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
@sachin21
sachin21 / laco.rb
Created October 12, 2016 01:39 — forked from toshia/laco.rb
らこらこらこ〜するmikutterプラグイン
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