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
# $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 ".[]" |
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
#!/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` |
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
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 |
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
#!/bin/sh | |
adb push hosts /data/local/tmp | |
adb shell "su -c 'mount -orw,remount /system'" | |
adb shell "su -c 'cp /data/local/tmp/hosts /system/etc/hosts'" | |
adb shell "su -c 'mount -oro,remount /system'" |
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
lsips () { | |
aws ec2 describe-instances $@ --query "Reservations[].Instances[].PrivateIpAddress" | |
} | |
lsfilters () { | |
lsips --filters $@ | |
} | |
lstag () { | |
lsfilters "Name=tag-key,Values=$1" "Name=tag-value,Values=$2" |
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
(defun get-url-title (url) | |
(interactive) | |
(with-temp-buffer | |
(call-process "curl" nil t nil "-s" url) | |
(goto-char (point-min)) | |
(let ((case-fold-search t)) | |
(re-search-forward "<title>\\([^<]*\\)</title>" nil t) | |
(match-string 1) | |
))) |
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
(defun create-github-pull-request () | |
(interactive) | |
(let ((buffer (get-buffer-create "*hub pull-request*")) | |
(cwd default-directory) | |
(my-local-map (make-keymap))) | |
(define-key my-local-map (kbd "C-c C-k") | |
'(lambda () | |
(interactive) | |
(kill-buffer (current-buffer)))) |
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
source "https://rubygems.org" | |
gem "nokogiri" | |
gem "open_uri_redirections" |
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
[Unit] | |
Description=Fluentd | |
Documentation=http://www.fluentd.org/ | |
After=network.target | |
[Service] | |
Type=forking | |
ExecStart=/usr/bin/fluentd -d /run/fluentd.pid | |
PIDFile=/run/fluentd.pid | |
Restart=on-failure |
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
module Main | |
( main | |
) where | |
import Control.Monad (filterM) | |
import Data.Maybe (fromJust) | |
import Graphics.UI.Gtk | |
import qualified Graphics.UI.Gtk.ModelView |
NewerOlder