View get_oracle_jdk_x64.sh
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 | |
# You must accept the Oracle JDK License Update | |
# https://www.oracle.com/java/technologies/javase-downloads.html | |
# usage: get_oracle_jdk_x64.sh <jdk_version> <platform> <ext> | |
# jdk_version: 14 | |
# platform: linux or osx or windows | |
# ext: rpm or dmg or tar.gz or exec | |
jdk_version=${1:-14} |
View Makefile
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
# How to encrypt/decrypt your text/blob secret with AWS KMS with AWS cli | |
# AWS_PROFILE=<profile> AWS_DEFAULT_REGION=<region> MY_KEY_ID=<kms key id> make (encrypt-text|decrypt-text|encrypt-blob|decrypt-blob) | |
KEY_ID=$(MY_KEY_ID) | |
SECRET_BLOB_PATH=fileb://my-secret-blob | |
SECRET_TEXT="my secret text" | |
ENCRYPTED_SECRET_AS_BLOB=encrypted_secret_blob | |
DECRYPTED_SECRET_AS_BLOB=decrypted_secret_blob # Result of decrypt-blob target |
View set_schema_migrations.rb
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
require 'optparse' | |
ENV['RAILS_ENV'] = ENV['RAILS_ENV'] || 'development' | |
require File.expand_path(File.dirname(__FILE__) + "/../config/environment") | |
opts = {} | |
ARGV.options {|opt| | |
opt.on('-s', '--save', 'save') {|v| opts[:save] = v } | |
opt.parse! |
View remote_bash.sh
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
# http://stackoverflow.com/questions/5735666/execute-bash-script-from-url | |
bash <(curl -s http://mywebsite.com/myscript.txt) | |
# http://stackoverflow.com/questions/4642915/passing-parameters-to-bash-when-executing-a-script-fetched-by-curl | |
curl http://foo.com/script.sh | bash -s arg1 arg2 |
View ksm.y
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/sh | |
# stand-alone bash version of vdsm's ksm.py | |
# monitor system memory load and tune ksm accordingly | |
# | |
# needs testing and ironing. contact danken@redhat.com if something breaks. | |
DEBUG=1 | |
KSMCTL="ksmctl" | |
KSM_MONITOR_INTERVAL=${KSM_MONITOR_INTERVAL:-60} | |
KSM_NPAGES_BOOST=${KSM_NPAGES_BOOST:-300} |
View .gitconfig
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
[alias] | |
rc = rebase --continue | |
ft = fetch | |
ftp = fetch --tags --prune | |
pr = pull --rebase | |
co = checkout | |
wd = diff --word-diff | |
br = branch | |
so = remote show origin | |
kc = commit |
View run-aws-assume-role.sh
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
readonly aws_account_id=xxx | |
readonly aws_asusme_role=xxx | |
readonly credentials=$(aws sts assume-role \ | |
--role-arn arn:aws:iam::$aws_account_id:role/$aws_assume_role \ | |
--role-session-name session-$(basename $0 .sh) \ | |
--query Credentials) | |
export AWS_ACCESS_KEY_ID=$(echo $credentials | jq -r '.AccessKeyId') | |
export AWS_SECRET_ACCESS_KEY=$(echo $credentials | jq -r '.SecretAccessKey') | |
export AWS_SESSION_TOKEN=$(echo $credentials | jq -r '.SessionToken') |
View gist:11243060
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
[unix_http_server] | |
file=/var/run/supervisor.sock ; (the path to the socket file) | |
;chmod=0700 ; sockef file mode (default 0700) | |
;chown=nobody:nogroup ; socket file uid:gid owner | |
;username=user ; (default is no username (open server)) | |
;password=123 ; (default is no password (open server)) | |
;[inet_http_server] ; inet (TCP) server disabled by default | |
;port=127.0.0.1:9001 ; (ip_address:port specifier, *:port for all iface) | |
;username=user ; (default is no username (open server)) |
View brew-cask-upgrade.sh
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 | |
for c in $(brew cask list); do | |
info=$(brew cask info $c) | |
installed_ver=$(echo "$info" | cut -d$'\n' -f1 | tr -d ' ' | cut -d':' -f 2) | |
current_ver=$(echo "$info" | cut -d$'\n' -f3 | cut -d' ' -f 1 | rev | cut -d'/' -f 1 | rev) | |
if [ "$installed_ver" != "$current_ver" ]; then | |
echo "$c is installed '$installed_ver', current is '$current_ver'" | |
brew cask reinstall $c | |
fi |
View install-vmware-tools.sh
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 | |
mkdir /mnt/cdrom | |
mount -r /dev/cdrom /mnt/cdrom | |
cd /tmp | |
tar zxf /mnt/cdrom/VMwareTools-*.tar.gz | |
./vmware-tools-distrib/vmware-install.pl --default |
NewerOlder