rails g controller api/v6/controller_name create --no-helper --skip-template-engine --skip-routes
mkdir spec/requests/api/v6/controller_name
mv spec/controllers/api/v6/controller_name.rb spec/requests/api/v6/controller_name/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Enables mouse | |
set -g mouse | |
set-window-option -g mode-keys vi | |
# CPU Status | |
set -g status-interval 1 # second | |
set -g status-right "#{prefix_highlight} CPU: #{cpu_icon} #{cpu_percentage} | %a %h-%d %H:%M " | |
# Sync Panes Status |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bind R source-file ~/.tmux/reload.tmux |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wget https://dl.pstmn.io/download/latest/linux64 -O postman.tar.gz | |
sudo tar -xzf postman.tar.gz -C /opt | |
rm postman.tar.gz | |
sudo ln -sf /opt/Postman/Postman /usr/bin/postman | |
cat > ~/.local/share/applications/postman.desktop <<EOL | |
[Desktop Entry] | |
Encoding=UTF-8 | |
Name=Postman | |
Exec=postman |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# make CapsLock behave like Ctrl: | |
setxkbmap -option ctrl:nocaps | |
# make short-pressed Ctrl behave like Escape: | |
xcape -e 'Control_L=Escape' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val foobar: Foobar? = ... | |
foobar?.let { /* foobar is not null */ } ?: run { /* foobar is null */ } | |
// this might be cool except for the back ticks ` | |
fun <T, R> T.`else`(block: T.() -> R) = run(block) | |
foobar?.let { /* foobar is not null */ } ?: `else` { /* foobar is null */ } |
NewerOlder