Skip to content

Instantly share code, notes, and snippets.

View saschaludwig's full-sized avatar

Sascha Ludwig saschaludwig

View GitHub Profile
@EarlGray
EarlGray / tone.py
Created September 12, 2012 14:13
A small WAV visualisation using PyQt
#! /usr/bin/python
from PyQt4 import QtCore
from PyQt4 import QtGui
import sys
import math
import struct
import wave
@wturnerharris
wturnerharris / xinitrc
Created January 20, 2015 20:35
X initialization script. This configures matchbox, resets chrome profile data, instructs the framebuffer to conform to explicit configuration, and starts an instance of chromium.
#!/bin/sh
while true; do
# Clean up previously running apps, gracefully at first then harshly
killall -TERM chromium 2>/dev/null;
killall -TERM matchbox-window-manager 2>/dev/null;
echo "Chrome and Matchbox terminated";
sleep 2;
killall -9 chromium 2>/dev/null;

Introduction

Sometimes you may want to use a DNS server for specific domain requests and another DNS server for all other requests. This is helpful, for instance, when connected to a VPN. For hosts behind that VPN you want to use the VPN's DNS server but all other hosts you want to use Google's public DNS. This is called "DNS splitting."

Here, we run dnsmasq as a background service on macOS. The dnsmasq configuration described below implements DNS splitting.

Install

brew install dnsmasq
To communicate with your AC over LAN network without connection to internet you need:
https://github.com/kueblc/midea-msmart/tree/support-8370
In example.py fill:
device = ac('YOUR_AC_IP', YOUR_AC_ID)
device.authenticate('YOUR_AC_MAC', 'YOUR_SSID', 'YOUR_WIFI_PW')
Then you must run this code on something computer:
#!/usr/bin/python3
#EXTM3U
#EXTINF:-1,BBC - Radio 1
http://a.files.bbci.co.uk/media/live/manifesto/audio/simulcast/hls/nonuk/sbr_low/ak/bbc_radio_one.m3u8
#EXTINF:-1,BBC - Radio 2
http://a.files.bbci.co.uk/media/live/manifesto/audio/simulcast/hls/nonuk/sbr_low/ak/bbc_radio_two.m3u8
#EXTINF:-1,BBC - Radio 3
http://a.files.bbci.co.uk/media/live/manifesto/audio/simulcast/hls/nonuk/sbr_low/ak/bbc_radio_three.m3u8
#EXTINF:-1,BBC - Radio 4
http://a.files.bbci.co.uk/media/live/manifesto/audio/simulcast/hls/nonuk/sbr_low/ak/bbc_radio_fourfm.m3u8
#EXTINF:-1,BBC - Radio 4 LW
@SinanMQTT
SinanMQTT / firstcode.txt
Last active March 5, 2024 22:09
HA Phone Dashboard by Sinan
square: false
type: grid
cards:
- type: horizontal-stack
cards:
- type: custom:mushroom-chips-card
chips:
- type: entity
entity: person.sinan_ibrahim
content_info: none
@clydebarrow
clydebarrow / .gitignore
Last active June 28, 2025 18:29
ESPHome LVGL samples
# Gitignore settings for ESPHome
# This is an example and may include too much for your use-case.
# You can modify this file to suit your needs.
/.esphome/
/secrets.yaml
/wifi.yaml
#!/bin/bash
USER="[email protected]"
# The path in dovecote mail folder to put the subfolders to
ARCHIVE_ROOT="INBOX.Archives"
# The paths of the folders to be processed during archive
BOXES_TO_ARCHIVE=("INBOX.Archive" "Archive*")
@b0gdanw
b0gdanw / Disable-Sequoia-Bloatware.sh
Last active July 1, 2025 12:43
Disable Sequoia Bloatware
#!/bin/zsh
# WARNING! The script is meant to show how and what can be disabled. Don’t use it as it is, adapt it to your needs.
# Credit: Original idea and script disable.sh by pwnsdx https://gist.github.com/pwnsdx/d87b034c4c0210b988040ad2f85a68d3
# Disabling unwanted services on macOS Big Sur (11), macOS Monterey (12), macOS Ventura (13), macOS Sonoma (14) and macOS Sequoia (15)
# Disabling SIP is required ("csrutil disable" from Terminal in Recovery)
# Modifications are written in /private/var/db/com.apple.xpc.launchd/ disabled.plist, disabled.501.plist
# To revert, delete /private/var/db/com.apple.xpc.launchd/ disabled.plist and disabled.501.plist and reboot; sudo rm -r /private/var/db/com.apple.xpc.launchd/*
# user