Skip to content

Instantly share code, notes, and snippets.

View saschaludwig's full-sized avatar

Sascha Ludwig saschaludwig

View GitHub Profile
@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
#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
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

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
@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;
@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