Skip to content

Instantly share code, notes, and snippets.

@saidie
saidie / keymap.txt
Last active April 12, 2017 01:20
A Mozc keymap config that replaces all IME On/Off keys in the default setting with Ctrl+\
status key command
DirectInput Ctrl \ IMEOn
Composition Backspace Backspace
Composition Ctrl Backspace Backspace
Composition Ctrl h Backspace
Composition Shift Backspace Backspace
Composition Ctrl z Cancel
Composition ESC Cancel
Composition Shift ESC Cancel
Conversion Backspace Cancel
#!/bin/sh
nextToken=
while [ "$nextToken" != "null" ]; do
if [ -z "$nextToken" ]; then
exArgs=
else
exArgs="--next-token $nextToken"
fi
res=`aws ssm describe-parameters --max-results 50 $exArgs`
# $HOME/.aws_util
#
# source this file in .bashrc or .zshrc
lsec2s () {
aws ec2 describe-instances --filter "Name=instance-state-name,Values=running" --query 'Reservations[].Instances[].{ id: InstanceId, name: Tags[?Key==`Name`].[Value][0][0], role: Tags[?Key==`Role`].[Value][0][0], ip: PrivateIpAddress }'
}
lsname () {
lsec2s | jq "[.[] | select(.name == \"$1\") | .ip]" | jq -r ".[]"