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
// Script that displays comments from a steem post in terminal. | |
// Use by passing username and permlink via terminal command. | |
// Example: comments.js kirkins frog-aquarium--2018-02-06-01-56-07 | |
// by: Philip Kirkbride (@kirkins) | |
const steem = require('steem'); | |
const logUpdate = require('log-update'); | |
const frames = ['-', '\\', '|', '/']; | |
let i = 0; |
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
# Add credentials and IP | |
# Use: hue <light_number/room_number> <brightness> | |
hue_user= | |
hue_ip= | |
hue() { | |
curl -d "{\"bri\":$2 }" -X PUT $hue_ip/api/$hue_user/lights/$1/state | |
} |
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
tryssh() | |
{ | |
until ssh $1; do | |
sleep 5 | |
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
#!/usr/bin/env bash | |
# | |
# Scan availible wifi networks | |
wifi=$(ifconfig -a | grep wl | cut -d' ' -f1) | |
ifconfig $wifi up | |
scan=$(iwlist $wifi scan) | |
essid=$(echo "$scan" | grep ESSID | cut -f2 -d":" | tr -d '"') | |
encryption=$(echo "$scan" | grep "Encryption key" | cut -f2 -d":") |
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 | |
# | |
# Scan availible wifi networks | |
# https://unix.stackexchange.com/questions/399222/jq-parse-colon-separated-value-pairs | |
nmcli_output=$(nmcli dev wifi | sed '$ d' | sed '1d') | |
#TODO use multi-line version of nmcli to better parse | |
# function for parsing nmcli output |
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 | |
# | |
# Scan availible wifi networks | |
# https://unix.stackexchange.com/questions/399222/jq-parse-colon-separated-value-pairs | |
# TODO see if you can pipe this directly into jq | |
nmcli_output=$(nmcli --mode multiline dev wifi) | |
# set all variables from nmcli | |
network=$(echo "$nmcli_output" | grep SSID: \ |
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 python | |
# | |
# A python that fetches the 200 latest tweets from a user | |
# then downloads any youtube video linked to. | |
# | |
# User can be changed with the variable below | |
user="YoutubeSandbox" | |
import re |
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
daemon off; | |
worker_processes auto; | |
error_log /var/log/nginx/error.log debug; | |
events { | |
worker_connections 1024; | |
} |
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 | |
# | |
# Get a list of all Unicode emoji in version 6.0 | |
wget -O output.txt http://www.unicode.org/Public/emoji/6.0/emoji-data.txt | |
sed -i '/^#/ d' output.txt # Remove comments | |
sed -i 's/.*(//' output.txt # Remove columns not needed | |
sed -i 's|[(),]||g' output.txt # Remove brackets | |
sed -i 's/\(.*[^ ]\)[ ]*\(.*\)/\2 \1/' output.txt # Move first column to last |
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
(require 'org) | |
(define-key global-map "\C-cl" 'org-store-link) | |
(define-key global-map "\C-ca" 'org-agenda) | |
(setq org-log-done 'time) | |
(setq org-agenda-files (list "~/org/work.org")) |