This file contains hidden or 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 | |
commit_msg_file=$1 | |
commit_msg=$(cat $commit_msg_file) | |
ticket_id=$(git rev-parse --abbrev-ref HEAD | grep -Eo '^(\w+/)?\w+\-[0-9]+' | grep -Eo '\w+\-[0-9]+' | tr "[:lower:]" "[:upper:]") | |
if [[ -z $ticket_id ]]; then | |
exit 0; | |
fi |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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 | |
# Config variables supplied by the user | |
TWILIO_ACCOUNT_SID="" | |
TWILIO_AUTH_TOKEN="" | |
TWILIO_NUMBER="" | |
TO_NUMBER="" | |
LOCAL_BACKUP_PATH="/path/to/router-backups" | |
ROUTER_HOSTNAME="192.168.1.1" |
This file contains hidden or 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
-- initiate the mqtt client and set keepalive timer to 120sec | |
mqtt2 = mqtt.Client("huzzah", 120, "user", "pass") | |
mqtt2:on("connect", function(con) print ("connected") end) | |
mqtt2:on("offline", function(con) print ("offline") end) | |
-- on receive message | |
mqtt2:on("message", function(conn, topic, data) | |
print(topic .. ":" ) | |
if data ~= nil then |
This file contains hidden or 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
export PS1="\[\e[00;37m\]\u@\h:\w \$? \\$ \[\e[0m\]" | |
alias pcp="time rsync --progress -ah" | |
alias ll="ls -lhF" | |
alias dfs="du -hx -d 1 . | sort -hr" |
This file contains hidden or 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
#include <Adafruit_NeoPixel.h> | |
#define NEOPIXEL_PIN 6 | |
#define NEOPIXEL_NUM_PIXELS 30 | |
typedef enum | |
{ | |
UP, | |
DOWN, | |
} AnimationDirection; |
This file contains hidden or 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
import Adafruit_BBIO.PWM as PWM | |
servo_pin = "P8_13" | |
duty_min = 2.5 | |
duty_max = 13.1 | |
duty_span = duty_max - duty_min | |
PWM.start(servo_pin, duty_span * 0.5, 60.0) | |
while True: |