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 | |
function get_headphones_index() { | |
echo $(pacmd list-cards | grep bluez_card -B1 | grep index | awk '{print $2}') | |
} | |
function get_headphones_mac_address() { | |
local temp=$(pacmd list-cards | grep bluez_card -C20 | grep 'device.string' | cut -d' ' -f 3) | |
temp="${temp%\"}" | |
temp="${temp#\"}" |
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
r#!/usr/bin/env bash | |
# -*- coding: utf-8 -*- | |
############################################################################################### | |
## | |
## This script should be run manually and will authenticate a user to Vault via the OIDC | |
## workflow. | |
## | |
############################################################################################### |
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 | |
LIGHT_GREEN='\e[1;32m' | |
NO_FORMAT='\e[0m' | |
UNDERLINE='\e[4m' | |
RESET_UNDERLINE='\e[24m' | |
COMMIT_MESSAGE="$(git show -s --format=%s HEAD)" | |
echo -e "${LIGHT_GREEN}When applied, this commit will ${UNDERLINE}${COMMIT_MESSAGE}${RESET_UNDERLINE}.${NO_FORMAT}" |
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 apt-get remove --purge "^mysql.*" | |
sudo apt-get autoremove | |
sudo apt-get autoclean | |
sudo rm -rf /var/lib/mysql | |
sudo rm -rf /var/log/mysql | |
echo mysql-apt-config mysql-apt-config/enable-repo select mysql-5.7-dmr | sudo debconf-set-selections | |
wget http://dev.mysql.com/get/mysql-apt-config_0.2.1-1ubuntu12.04_all.deb | |
sudo dpkg --install mysql-apt-config_0.2.1-1ubuntu12.04_all.deb | |
sudo apt-get update -q | |
sudo apt-get install -q -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" mysql-server |
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
<?php | |
class Foo | |
{ | |
protected $foo; | |
protected $bar; | |
protected $baz; | |
} |
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/php | |
<?php | |
/** | |
* .git/hooks/pre-commit | |
* | |
* This pre-commit hooks will check for PHP error (lint), and make sure the code | |
* is PSR compliant. | |
* | |
* Dependecy: PHP-CS-Fixer (https://github.com/fabpot/PHP-CS-Fixer) | |
* |
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 python2 | |
# Author: Ian Good <ian.good@rackspace.com> | |
# Inspired by http://costela.net/projects/awayonlock/ | |
# Use at your own risk! | |
import os | |
import sys | |
import signal | |
import hashlib |