Skip to content

Instantly share code, notes, and snippets.

View pew's full-sized avatar
👋

Jonas pew

👋
  • Munich, Germany
View GitHub Profile
@pew
pew / README.md
Created April 23, 2024 09:07
utm restart vm

this is an apple script to toggle a restart of a specific UTM virtual machine. Replace the name Linux Ubuntu with your VM's name

blueprint:
name: ZHA - Philips Hue Dimmer Switch Config - V2023.02.07
description: |
Control lights with a Philips Hue Dimmer Switch (only RWL020 (US) and RWL021 (EU), RWL022, the one that says 'hue' on the bottom, has a different button layout.)
This blueprint is a simplified version of stefanroelofs's `ZHA - Philis Hue Dimmer Switch V2', but this one has no default inputs and with full configuration available. This makes the remote easily configurable for purposes other than controlling lights.
If you are intending to just use it for use as a light switch, I recommend using his blueprint, which you can find at https://gist.github.com/stefanroelofs/775e2e0a3cdb3d72a9451fb247492d59
It includes customizable 'on' button behaviour and default setup of the dimmer buttons to dim as they normally would. To make the configuration available for other automations, I had to remove these very useful functionalities.
@pew
pew / Install.txt
Created August 26, 2022 07:26 — forked from soderlind/Install.txt
macOS DoH! (DNS over HTTPS) using cloudflared
1) Install cloudflared using homebrew:
brew install cloudflare/cloudflare/cloudflared
2) Create /usr/local/etc/cloudflared/config.yaml, with the following content
proxy-dns: true
proxy-dns-upstream:
- https://1.1.1.1/dns-query
- https://1.0.0.1/dns-query
@pew
pew / overcast.py
Created May 29, 2022 02:46
upload to overcast with httpx
import httpx
from bs4 import BeautifulSoup
client = httpx.Client()
r = client.post(
"https://overcast.fm/login",
data={
"email": "",
"password": "",
@pew
pew / backup_starred_repos.sh
Created January 10, 2022 05:43
Clone Starred GitHub Repositories
# install the `gh` CLI first: https://cli.github.com
gh api user/starred --paginate -q '.[].clone_url' | xargs -n1 gh repo clone
@pew
pew / cloudflare_ip.tf
Created December 24, 2021 13:03
Terraform Allow List Cloudflare IP Ranges Without Auth/API Token
provider "http" {}
data "http" "cloudflare_ips" {
url = "https://api.cloudflare.com/client/v4/ips"
request_headers = {
Accept = "application/json"
}
}
locals {
@pew
pew / github_backup.sh
Created December 3, 2021 05:04
backup all github repos
# install gh cli: https://cli.github.com
# using "api user/repos" allows do use --paginate so you get all your repos, also the repos you're part of in other orgs
gh api user/repos --paginate -q '.[].full_name' | xargs -n1 gh repo clone
@pew
pew / keybase.md
Created August 10, 2015 00:37
keybase.md

Keybase proof

I hereby claim:

  • I am pew on github.
  • I am pew_pew (https://keybase.io/pew_pew) on keybase.
  • I have a public key whose fingerprint is 2621 79BF 1E24 82D8 6FC2 E8F0 4277 211B 1597 4B54

To claim this, I am signing this object:

#!/bin/bash
#
# crashplanFixup.sh for Macintosh OS X 10.9 (and probably earlier versions)
#
# This script will prevent CrashPlan from de-duplicating data on files greater than 1k.
# Based on information from http://networkrockstar.ca/2013/09/speeding-up-crashplan-backups/
#
# NOTE: Must be run with sudo! IE: $ sudo sh ./crashplanFixup
#
# v1.1 2014-03-13 by bill@wellingtonnet.net