Most of these should work in bash and/or zsh
Get network location
CURRENT_LOCATION=$(scselect | tail -n +2 | egrep '^\ +\*' | cut -d \( -f 2- | sed 's/)$//')
#!/bin/bash | |
if [ -z "$1" ] | |
then | |
echo "No trigger supplied" | |
exit | |
fi | |
curl "http://127.0.0.1:12345/trigger_named/?trigger_name=$*" |
from picamera import PiCamera | |
import time | |
import os | |
camera = PiCamera() | |
camera.start_preview() | |
time.sleep(3) | |
currentTime = time.strftime("%Y-%m-%d-%T") |
#!/usr/bin/python | |
# -*- coding:utf-8 -*- | |
import sys | |
import os | |
picdir = os.path.join(os.path.dirname(os.path.dirname(os.path.realpath(__file__))), 'pic') | |
libdir = os.path.join(os.path.dirname(os.path.dirname(os.path.realpath(__file__))), 'lib') | |
if os.path.exists(libdir): | |
sys.path.append(libdir) | |
import logging |
{ | |
"current": "https://open.spotify.com/playlist/3YKHRGx3OoWO2tRe3Duorm?si=24f725b6776a41fa", | |
"chill": "https://open.spotify.com/playlist/0x0ZQcmLsamIx5bF5px2Tc?si=JRKDeoYdS02T66Lhlo7V_w", | |
"spring": "https://open.spotify.com/playlist/68z163CKUImi0QB6ZpSigr?si=H-rEE3kMQ8WcEfgg-c6iQw", | |
"summer": "https://open.spotify.com/playlist/5wpb3PdQOzFb3jurTcVfZO?si=vMQ-JzRIRNqgCeGFTIZrXQ", | |
"autumn": "https://open.spotify.com/playlist/22XncHS02W5RWJ1yM4lV6l?si=2yW8i1WbSp6kk5gjEHXMIQ", | |
"winter": "https://open.spotify.com/playlist/67SvJfEofXhdIXwsuUJbCJ?si=DWOzFjMqQkqokKPueAGZaA", | |
"sleep": "https://open.spotify.com/playlist/13RQxSzWqVg3fHlalxlyhC?si=x8ppL0ZuSjKv8if8dQM39g", | |
"coding": "https://open.spotify.com/playlist/0camicGxGNwB9YS66nAwtb?si=ZpBdqb-7RWiDIiRt0g-asw", | |
"sports": "https://open.spotify.com/playlist/4X1uZRUIccnwcofS8QjBku?si=MK9RWVXWQaShcaiuyfJx6A", |
# Say a random curseword | |
function cuss () { | |
CUSS_WORDS=("fuck" "shit" "bitch" "asshole" "motherfucker" "cunt") | |
VOICES=("Albert" "Zarvox" "Alex" "Bad News" "Deranged" "Trinoids" "Hysterical") | |
RANDOM_VOICE=${VOICES[$( jot -r 1 0 $((${#VOICES[@]} - 1)) )]} | |
CUSS=${CUSS_WORDS[$( jot -r 1 0 $((${#CUSS_WORDS[@]} - 1)) )]} | |
echo $CUSS | |
say ${1:-$CUSS} -v ${2:-$RANDOM_VOICE} | |
} |
<iframe src="https://muensterer.xyz" width="1920" height="1080" frameborder="0" style="border:0"></iframe> |
This snippet allows you to extract json content from a gist file to be served via an api.
Replace id
with the id from your gist's url and modify the filename if you don't want to use the default response.json
.
export default async (id = 'a36fa8e855b19e9ebddb8a2878103b04', filename = 'response.json') => {
const gistUrl = 'https://api.github.com/gists/' + id
const response = await fetch(gistUrl)
const { files } = await response.json()
return JSON.parse(files[filename].content)
}
[ | |
"fuck", | |
"shit", | |
"bitch", | |
"motherfucker", | |
"fuckface", | |
"dick", | |
"twat", | |
"dickhead" | |
] |