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
kubectl get po -a --all-namespaces -o json | jq '.items[] | select(.status.reason!=null) | select(.status.reason | contains("Evicted")) | "kubectl delete po \(.metadata.name) -n \(.metadata.namespace)"' | xargs -n 1 bash -c |
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
#!/usr/bin/env bash | |
branch_name=`git symbolic-ref --short HEAD` | |
retcode=$? | |
non_push_suffix="_local" | |
# Only push if branch_name was found (my be empty if in detached head state) | |
if [ $retcode = 0 ] ; then | |
#Only push if branch_name does not end with the non-push suffix |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<style> | |
body { | |
height: 100%; | |
margin: 0; | |
width: 100%; | |
overflow: hidden; | |
} |
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
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Sid": "DelegateS3AccessForMigration", | |
"Effect": "Allow", | |
"Principal": { | |
"AWS": "arn:aws:iam::000000000000:root" | |
}, | |
"Action": "s3:*", |
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
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Effect": "Allow", | |
"Action": [ | |
"s3:*" | |
], | |
"Resource": [ | |
"arn:aws:s3:::saso-test-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
➜ s3-sync git:(master) go run main.go sync --config config.prod.yaml | |
Using config file: config.prod.yaml | |
2017/05/30 15:20:05 Creating user(saso) policy | |
2017/05/30 15:20:06 Creating bucket(saso-test) policy | |
2017/05/30 15:20:07 Creating bucket(us-east-1-checkr-saso-test) | |
2017/05/30 15:20:08 Enabling bucket(us-east-1-checkr-saso-test) versioning | |
2017/05/30 15:20:09 Running bucket(saso-test) => bucket(us-east-1-checkr-saso-test) sync | |
copy: s3://saso-test/projects.csv to s3://us-east-1-checkr-saso-test/projects.csv |
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
+------------------+----------+----------------------------+------------+---------------------+ | |
| CURRENT NAME | SYNC | NEW NAME | PROJECT 1 | PROJECT 2 | | |
+------------------+----------+----------------------------+------------+---------------------+ | |
| checkr-documents | YES | us-east-1-checkr-documents | checkr-api | checkr-microservice | | |
| checkr-test | NO | | | | | |
| checkr-unknown | ??? | | | | | |
+------------------+----------+----------------------------+------------+---------------------+ |
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
# First remove *all* keybindings | |
unbind-key -a | |
# Now reinsert all the regular tmux keys | |
bind-key C-b send-prefix | |
bind-key C-o rotate-window | |
bind-key C-z suspend-client | |
bind-key Space next-layout | |
bind-key ! break-pane | |
bind-key \" split-window |
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
# bash <(curl -s https://gist.githubusercontent.com/sasso/a240f9135e5c77ad460a5f2fd2c993be/raw/server-bootstrap.sh?$(date +"%T")) | |
# packages | |
sudo apt-get update | |
sudo apt-get install vim tmux telnet | |
# tmux | |
curl -s -o ~/.tmux.conf https://gist.githubusercontent.com/sasso/2750b5e3e8526651cdefda9d3f19fa77/raw/.tmux.conf | |
# bash |
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
#unbind-key -a | |
set -g default-terminal "screen-256color" | |
# remap prefix from 'C-b' to 'C-a' | |
unbind C-b | |
set-option -g prefix C-a | |
bind-key C-a send-prefix | |
# split panes using | and - |
NewerOlder