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/env bash | |
# | |
# author: [email protected] | |
# inspiration from https://www.reddit.com/r/tmux/comments/7r8otc/is_there_short_command_to_expansetoggle_tmux_pane/ | |
# | |
# This script toggles the vertical size of the current tmux pane to maximum | |
# Note that the other panes in the same column will still be visible, but | |
# they will be only one line tall. | |
# | |
# Installation: |
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
if [[ "$(command -v peco)" ]]; then | |
# Search shell history with peco: https://github.com/peco/peco | |
# Adapted from: https://github.com/mooz/percol#zsh-history-search | |
function peco_select_history() { | |
BUFFER=$(fc -lnr 1 | peco --initial-filter Regexp --query "$LBUFFER") | |
CURSOR=$#BUFFER # move cursor | |
zle -R -c # refresh | |
} | |
zle -N peco_select_history |
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 | |
# This script will send the Jenkinsfile in the current directory | |
# to the validation endpoint on a Jenkins server | |
# simply set and export the following variables, then run the script | |
# this will be something like "https://jenkins.yourdomain.com" | |
# export JENKINS_URL='' |
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
# get a version count of all Elasticbeanstalk application | |
aws elasticbeanstalk describe-application-versions | jq '.ApplicationVersions[] | .ApplicationName' | sort | uniq -c | sort -nr |
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
# all the 4xx errors | |
[host, logName, user, timestamp, request, statusCode=4*, size] |
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
dig +short myip.opendns.com @resolver1.opendns.com |
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
sudo /opt/elasticbeanstalk/bin/get-config |
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
aws ec2 describe-snapshots --owner-ids <owner> --query 'Snapshots[?StartTime<=`2017-01-01T00:00-07:00`]' > out |
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
kubectl delete svc kubernetes-dashboard --namespace kube-system | |
kubectl create -f https://rawgit.com/kubernetes/dashboard/master/src/deploy/kubernetes-dashboard.yaml |
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/env ruby | |
# Simple script to pull all issues from a github repo. | |
# Simply create an authentication token in github | |
# Then set the environment variable GITHUB_TOKEN to that | |
# then run the script passing the <owner>/<repo> as the one and only parameter | |
# output will be in JSON form. From there you can use jq - https://stedolan.github.io/jq/ | |
# For example: cat file.json| jq '.[] | .user.login, .title, .body' etc. | |
# requires octokit and json module |
NewerOlder