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
# shows git branch if any | |
function git_branch { | |
if [[ -x /usr/bin/git ]]; then | |
git branch &> /dev/null | |
if [[ $? == 0 ]]; then | |
branch=$(git branch | awk '/^\* / {print $2}') | |
echo -n "($branch) " | |
fi | |
fi | |
} |
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
CGI::Lite - built "libcgi-lite-perl" | |
Mail::Mailer - in repo "libmailtools-perl" | |
Data::GUID - backported "libdata-guid-perl" | |
Text::CSV - in repo "libtext-csv-perl" | |
JSON - in repo "libjson-perl" | |
Proc::ProcessTable - in repo "libproc-processtable-perl" | |
Authen::SASL - in repo "libauthen-sasl-perl" | |
URI::Escape::XS - in repo "liburi-escape-xs-perl" | |
YAML - in repo "libyaml-perl" |
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
#cloud-config | |
users: | |
- name: foo | |
passwd: $6$5s2u6/jR$un0AvWnqilcgaNB3Mkxd5yYv6mTlWfOoCYHZmfi3LDKVltj.E8XNKE | |
groups: | |
- sudo | |
- docker | |
ssh-authorized-keys: | |
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC0g+ZTxC7weoIJLUafOgrm+ |
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
[Unit] | |
Description=BT Wifi auto login hack | |
After=network.target | |
[Service] | |
Restart=always | |
RestartSec=30 | |
ExecStart=/home/vaijab/bin/btwifi_autologin.sh | |
[Install] |
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
### Keybase proof | |
I hereby claim: | |
* I am vaijab on github. | |
* I am vaijab (https://keybase.io/vaijab) on keybase. | |
* I have a public key whose fingerprint is 8B85 568C BB82 3F47 9866 7A8C DCA0 ECDC FC69 7983 | |
To claim this, I am signing this object: |
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/bash | |
files="*.service" | |
for fname in ${files}; do | |
[[ -e ${fname} ]] || continue | |
read -r h f <<< $(md5sum ${fname}) | |
echo ""${f/%.service/@${h}.service}"" | |
done |
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
for n in $(docker ps -a | awk '/Exited \([0-9]*/ {print $1}'); do docker rm -f -v ${n}; done | |
docker rmi $(docker images | awk '/^<none>/ {print $3}') | |
wget -q https://github.com/chadoe/docker-cleanup-volumes/raw/master/docker-cleanup-volumes.sh | |
bash docker-cleanup-volumes.sh -v |
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/bash | |
if [[ -d ${1} ]]; then | |
path="${1}/" | |
files="${path}*" | |
elif [[ -f ${1} ]]; then | |
files="${1}" | |
# Else fallback to finding files in current directory | |
elif [[ ${#} -eq 0 ]]; then | |
files="*" |
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/bash | |
: ${1?"etcd2 protocol has not been set. Specify http or https as first argument."} | |
: ${2?"etcd2 data dir has not been set. Specify as second argument."} | |
source /etc/environment | |
sudo systemctl stop etcd2.service | |
sudo rm -rf ${2}/member |
OlderNewer