Skip to content

Instantly share code, notes, and snippets.

@mountbatt
mountbatt / wetter.js
Last active December 30, 2023 13:37
Scriptable Widget to get Weather Data from a weewx driven Weather-Station via JSON by weewx-json (https://github.com/teeks99/weewx-json). With Shortcodes this Widget is fully Siri compatible!
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: blue; icon-glyph: sun;
// Check weewx Weather
// Script Updates: https://gist.github.com/mountbatt/163c5d8f8bd7978e1f3c06b3dcccf00f
// Version: 0.7.4
// edit:
let endpoint = "http://www.waldbadviertel-wetter.de/current_minimal.json"
let prefix = "im" // im | in | at ... defines "im Waldbadviertel" oder "in Cologne" (set to "in" or "at" for good english)
@vxgmichel
vxgmichel / udpproxy.py
Created February 2, 2017 10:05
UDP proxy server using asyncio
"""UDP proxy server."""
import asyncio
class ProxyDatagramProtocol(asyncio.DatagramProtocol):
def __init__(self, remote_address):
self.remote_address = remote_address
self.remotes = {}
@germanviscuso
germanviscuso / sync.sh
Last active November 18, 2021 22:15
Mirror/Sync Github Organization Repos locally
#!/bin/bash
# Clone all org repos (via ssh)
curl -s https://api.github.com/orgs/<organization>/repos?per_page=200 | python -c $'import json, sys, os\nfor repo in json.load(sys.stdin): os.system("git clone " + repo["ssh_url"])'
# Later pull from each repo
back=`pwd`; for d in `find . -type d -name .git` ; do cd "$d/.."; git pull origin; cd $back ; done