Dashing widget to display weather from forecast.io. This widget was forked from https://gist.github.com/mjamieson/5274790 to add Skycons and the forecast for later in the day.
##Usage
#!/usr/bin/perl -wl | |
use strict; | |
my $limit = 1024 * 1024; | |
my $hasBadFiles; | |
while (<>) { | |
chomp; | |
my ($old, $new, $ref) = split / /, $_; |
#!/usr/bin/env ruby | |
APP_PATH = File.expand_path('../../config/application', __FILE__) | |
require File.expand_path('../../config/boot', __FILE__) | |
require 'rails/commands/console' | |
require APP_PATH | |
Rails.application.require_environment! | |
require "arproxy" | |
module Arproxy | |
class Readonly < Base |
Dashing widget to display weather from forecast.io. This widget was forked from https://gist.github.com/mjamieson/5274790 to add Skycons and the forecast for later in the day.
##Usage
http://saturn:32400/web/index.html#!/server/1d289f50f716872fa0043edb52d4854027289ef1/details/%2Flibrary%2Fmetadata%2F21905 | |
https://plex.tv/pms/system/library/sections | |
7a9403ed2084a69936ee1c6c6e6b905642420c2e | |
http://[PMS_IP_Address]:32400/library/sections?X-Plex-Token=YourTokenGoesHere | |
http://saturn.hq.thebikeshed.io:32400/sections?X-Plex-Token=${X_PLEX_TOKEN} | |
curl -X GET http://saturn.hq.thebikeshed.io:32400/library/sections?X-Plex-Token=${X_PLEX_TOKEN} | |
curl -X GET 'http://saturn.hq.thebikeshed.io:32400/library/sections/4/refresh?X-Plex-Token=${X_PLEX_TOKEN}&force=1' |
#!/bin/bash | |
# Derive our topic from our some/topic@hostname | |
topic_at_host=$1; shift | |
host=$(echo ${topic_at_host} | sed -e 's/^.*@//') | |
topic=$(echo ${topic_at_host} | sed -e 's/@.*$//') | |
# Generate a random topic for reply | |
reply_topic="$(dd if=/dev/random bs=2048 count=1 2>/dev/null | shasum | awk '{print $1}')" | |
# append a 'respond':'mqtt/_random_reply_topic' to our user-provided message |
# First extract the rate into a variable called req.src_http_req_rate | |
http-request content set-var req.src_http_req_rate %[src_http_req_rate] | |
# Then use this variable in the acl by subtracting the current rate from the | |
# value returned from the map. If the result is less than 0, the request rate | |
# is larger than the allowed value | |
acl abuse src,map_ip_int(/etc/haproxy/ips.map),sub(req.src_http_req_rate) -m int lt 0 |
Backup: | |
docker exec -t -u postgres your-db-container pg_dumpall -c > dump_`date +%d-%m-%Y"_"%H_%M_%S`.sql | |
Restore: | |
cat your_dump.sql | docker exec -i your-db-container psql -Upostgres |
alias kc='kubectl' | |
alias kclf='kubectl logs --tail=200 -f' | |
alias kcgs='kubectl get service -o wide' | |
alias kcgd='kubectl get deployment -o wide' | |
alias kcgp='kubectl get pod -o wide' | |
alias kcgn='kubectl get node -o wide' | |
alias kcdp='kubectl describe pod' | |
alias kcds='kubectl describe service' | |
alias kcdd='kubectl describe deployment' | |
alias kcdf='kubectl delete -f' |
Download the latest ugw3
package from https://github.com/Lochnair/vyatta-wireguard/releases and install it on your USG using dpkg -i wireguard-ugw3-<version>.deb
.
cd /config/auth
umask 077
mkdir wireguard
cd wireguard
wg genkey > wg_private.key
wg pubkey < wg_private.key > wg_public.key
This was a huge hassle to figure out, so I wrote up a little guide in hopes that others would find it helpful:
macOS's domain name resolver will only return IPv6 addresses (from AAAA records) when it thinks that you have a valid routable IPv6 address. For physical interfaces like Ethernet or Wi-Fi it's enough to set or be assigned an IPv6 address, but for tunnels (such as those using utun
interfaces) there are some extra annoying steps that need to be taken to convince the system that yes, you indeed have an IPv6 address, and yes, you'd like to get IPv6 addresses back for DNS lookups.
I use wg-quick
to establish a WireGuard tunnel between my laptop and a Linode virtual server. WireGuard uses a utun
user-space tunnel device to make the connection. Here's how that device gets configured: