Skip to content

Instantly share code, notes, and snippets.


Shohei Kameda shohey1226

View GitHub Profile
shohey1226 /
Last active June 2, 2022 22:32
How to load Jquery with Turbo

Googling Turbo is hard. Always google hits turbolinks. It needs to use -turbolink all the time. And less document comparing to turbolinks.

There is an event similar to turbolink to load JS.

import "@hotwired/turbo-rails"; 
import "controllers";
import jquery from "jquery";
  • :winc (=Ctrl-w) e.g. :winc l
  • g+t/T (=tab move)
  • number+ g+t (=move the tab) e.g. 2 g t
  • :tabs (=show list of tabs)
  • Ctrl-e (set keymap to toggle tree view)
  • Ctrl-u Ctrl-p file search
  • Ctrl-u Ctrl-g pattern seach
  • :%y+ yank all contents in the file
shohey1226 / create_g_suite_account.rb
Last active February 27, 2019 17:57
How to create GSuite user by ruby api (always confusing this due to a lack of docs..)
View create_g_suite_account.rb
def create_g_suite_email
return if Rails.env.test? || Rails.env.development? # skip if it's test
g_email = "#{self.first_name}.#{self.last_name}".downcase
user_object =
user_object.primary_email = g_email = = self.first_name = self.last_name
user_object.password = 'xxxxxxxxxxxx'
response = admin_directory.insert_user(user_object)
View lxd-forward
#!/usr/bin/env bash
function usage() {
echo "Usage: $(basename ${0}) [add|list|delete] [container] [port] [host port]"
exit 1
Keyboard Command Description
Command + f Search a word
Command + c Copy
Command + v Paste
Command + r Reload *Try when Terminal is hung
Keyboard Command Description
Command + s Save file
Command + c Copy
Command + v Paste
Control + Tab Change file
Command + w Close file
Command + n Open new file
Keyboard Command Description
Command + i Show hints
Command + c Copy
Command + v Paste
Command + r Reload
Control + p Scroll up
Control + n Scroll down
Command + [ Go back
Command + ] Go forward
Keyboard Command Description
Command + Tab Move window
Command + Tab + Shift Move window - Reverse
Command + / Full screen(back from Full screen)
shohey1226 / .babelrc
Created November 25, 2015 03:28 — forked from joshblack/.babelrc
Whitelist transformers in `.babelrc` for projects
View .babelrc
"retainLines": true,
"compact": true,
"comments": false,
"whitelist": [
export PLENV_ROOT=/opt/perl5
if [[ ! -e $PLENV_ROOT ]];then
mkdir -p /opt/perl5
git clone git:// $PLENV_ROOT
git clone git:// $PLENV_ROOT/plugins/perl-build/
$PLENV_ROOT/bin/plenv install 5.18.2
$PLENV_ROOT/bin/plenv rehash