Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env bash
commit="$1"
date="$2"
git filter-branch --env-filter \
"if test \$GIT_COMMIT = '$commit'
then
export GIT_AUTHOR_DATE='$date'
export GIT_COMMITTER_DATE='$date'

Keybase proof

I hereby claim:

  • I am debo on github.
  • I am debo (https://keybase.io/debo) on keybase.
  • I have a public key whose fingerprint is 1B0C ED9A 5805 213C A9E5 175A 2054 7CDF F530 5EC6

To claim this, I am signing this object:

#!/usr/bin/env zsh
#
# Wikify by Mario "Kuroir" Ricalde
#
function wikify() {
# gnu ls has natural number sorting, useful for sorting 1, 10, 2 into 1, 2, 10
function gls_or_ls() {
if hash gls 2>/dev/null; then
gls -v "$@"
git clone https://github.com/phansible/role-php.git src/Phansible/Resources/ansible/roles/php
git clone https://github.com/phansible/role-apache.git src/Phansible/Resources/ansible/roles/apache
git clone https://github.com/phansible/role-beanstalkd.git src/Phansible/Resources/ansible/roles/beanstalkd
git clone https://github.com/phansible/role-blackfire.git src/Phansible/Resources/ansible/roles/blackfire
git clone https://github.com/phansible/role-composer.git src/Phansible/Resources/ansible/roles/composer
git clone https://github.com/phansible/role-elasticsearch.git src/Phansible/Resources/ansible/roles/elasticsearch
git clone https://github.com/phansible/role-hhvm.git src/Phansible/Resources/ansible/roles/hhvm
git clone https://github.com/phansible/role-mariadb.git src/Phansible/Resources/ansible/roles/mariadb
git clone https://github.com/phansible/role-mongodb.git src/Phansible/Resources/ansible/roles/mongodb
git clone https://github.com/phansible/role-mysql.git src/Phansible/Resources/ansible/roles/mysql
@debo
debo / AWS EC2 Utils
Last active December 1, 2016 03:57
Useful CLI comands to ssh into or terminate your AWS EC2 instances without AWS Console
aws ec2 describe-instances --filter Name=tag:Name,Values='[query]' --profile=[profile] --region=[region] | jq '.Reservations[].Instances[].PrivateIpAddress'| sed 's/"//g' | sed 's/null//g' | sed '/^\s*$/d' | sort
aws ec2 describe-instances --filter Name=tag:Name,Values='[query]' --profile=[profile] --region=[region] | jq '.Reservations[].Instances[].InstanceId'| sed 's/"//g' | sort
aws ec2 terminate-instances --instance-ids [instanceId] --profile=[profile] --region=[region]
@debo
debo / ec2-expand
Last active March 1, 2017 02:19
Commands to extend disk on an AWS EC2
# add a new volume to the instance, ssh into the machine and execute the following commands
lsblk
pvcreate /dev/xvdf
pvdisplay # for sanity check
vgextend vg0 /dev/xvdf
lvextend -l+100%FREE /dev/mapper/vg0-storage
xfs_growfs /storage
df -h # profit
#!/usr/bin/env bash
git filter-branch --env-filter '
old_author_email="$1"
new_author_name="$2"
new_author_email="$3"
if [ "$GIT_COMMITTER_EMAIL" = "$old_author_email" ]
then
#!/usr/bin/env bash
# Just copy and paste the lines below (all at once, it won't work line by line!)
# MAKE SURE YOU ARE HAPPY WITH WHAT IT DOES FIRST! THERE IS NO WARRANTY!
function abort {
echo "$1"
exit 1
}
set -e
#!/usr/bin/env bash
sudo pmset -c sleep 10 displaysleep 10 disksleep 10
sudo pmset -b sleep 10 displaysleep 2 disksleep 10
@debo
debo / no-sleep
Last active January 30, 2019 16:25
#!/usr/bin/env bash
sudo pmset -c sleep 1440 displaysleep 10 disksleep 1440
sudo pmset -b sleep 1440 displaysleep 2 disksleep 1440