This file contains 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/bash | |
set -e | |
sudo yum -y install git gcc openssl-devel automake | |
cd $(mktemp -d) | |
git clone https://github.com/JoeDog/siege.git . | |
./utils/bootstrap | |
./configure | |
make | |
sudo make install |
This file contains 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/bash | |
region="ap-northeast-1" | |
actions="arn:aws:sns:ap-northeast-1:123456789012:AlertMe" | |
for elb in $(aws elb describe-load-balancers | jq -r '.LoadBalancerDescriptions[].LoadBalancerName'); do | |
aws cloudwatch put-metric-alarm \ | |
--region "$region" \ | |
--alarm-name "$name-ELB-HealthyHost-Disapeared-Alarm" \ | |
--alarm-description "CreateFromCLI" \ |
This file contains 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/bash | |
set -e | |
brew install sanemat/font/ricty --with-powerline | |
/bin/cp /usr/local/opt/ricty/share/fonts/Ricty*.ttf ~/Library/Fonts | |
fc-cache -vf # 何か入力待ちみたいな表示が出るが待ってればよいだけなので気にしちゃだめ | |
brew uninstall ricty # フォントさえ手に入ってしまえば不要なので削除 |
This file contains 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/bash | |
if [[ -z $1 ]]; then | |
echo "Usage: $0 AWS_SECRET_ACCESS_KEY" | |
echo "Convert AWS_SECRET_ACCESS_KEY to the ses password." | |
exit 1 | |
fi | |
HMAC_BIN=$(echo -n SendRawEmail | openssl dgst -binary -sha256 -hmac "$1") | |
printf '\02%s' "$HMAC_BIN" | openssl base64 |
This file contains 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
// ==UserScript== | |
// @name unti-unti-console-log | |
// @namespace https://twitter.com/kawaz/status/889484844702457856 | |
// @version 0.1 | |
// @description Revive the sealed console | |
// @author Yoshiaki Kawazu ( https://twitter.com/kawaz ) | |
// @match https://twitter.com/* | |
// @grant unsafeWindow | |
// ==/UserScript== | |
{ |
This file contains 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
#! /usr/bin/perl | |
# https://gist.github.com/kawaz/3e423b0fc6eda643f1f5e11c8f5e0eca | |
use POSIX qw(setuid setgid); | |
use Unix::Groups qw(setgroups); | |
die "usage: setusergroups username child\n" | |
unless @ARGV >= 2; | |
my $username = shift @ARGV; |
This file contains 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/bash | |
sudo apt-get install git linux-headers-generic build-essential dkms | |
git co https://github.com/Mange/rtl8192eu-linux-driver.git | |
cd rtl8192eu-linux-driver | |
sudo dkms add . | |
git apply <(curl -sL https://gist.github.com/kawaz/6f2dcb707430b13e4db66a69b1fb91f0/raw/aeee0a55ea44bb7751931f181bc5ca8c62290891/rtl8192eu-linux-driver.5a62f24..7138a26.diff) | |
sudo dkms install rtl8192eu/1.0 | |
# If already installed, use | |
# sudo dkms remove rtl8192eu/1.0 --all |
This file contains 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
z.now() { date +%s; } | |
z.uptime() { echo $(($(z.now) - $(date -d "$(uptime -s)" +%s))); } |
This file contains 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
- hosts: all | |
become: yes | |
tags: docker | |
tasks: | |
- name: docker install | |
block: | |
- name: install docker | |
yum: name=docker | |
- name: enable service (upstart) | |
service: name=docker state=started enabled=yes |
This file contains 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/bash | |
brew tap mscharley/homebrew | |
brew install --HEAD alacritty | |
ln -s /usr/local/opt/alacritty/Applications/Alacritty.app /Applications/ |