Skip to content

Instantly share code, notes, and snippets.

@Dhertz
Dhertz / Ubuntu_Aerial.md
Last active March 28, 2023 02:06
Quick overview of how to get Apple's new TV screensavers working on most linux systems.

Using Apple’s Aerial Screensavers on Ubuntu After coming across the [Aerial] (https://github.com/JohnCoates/Aerial) screensavers for Mac, and installing them, I decided that I had had enough of the graphics-demos of my Ubuntu Precise system. I hope to provide a simple guide on how to add them to your setup as well.

First, you need to install xscreensaver (for example with aptitude, but your distro should have it):

sudo aptitude install xscreensaver
@matthewbednarski
matthewbednarski / postal-codes.json
Last active May 25, 2023 12:38
Global postal codes regex formats
[{ "Note": "The first two digits (ranging from 10–43) correspond to the province, while the last two digits correspond either to the city/delivery zone (range 01–50) or to the district/delivery zone (range 51–99). Afghanistan Postal code lookup", "Country": "Afghanistan", "ISO": "AF", "Format": "NNNN", "Regex": "^\\d{4}$" }, { "Note": "With Finland, first two numbers are 22.", "Country": "Åland Islands", "ISO": "AX", "Format": "NNNNN", "Regex": "^\\d{5}$" }, { "Note": "Introduced in 2006, gradually implemented throughout 2007.", "Country": "Albania", "ISO": "AL", "Format": "NNNN", "Regex": "^\\d{4}$" }, { "Note": "First two as in ISO 3166-2:DZ", "Country": "Algeria", "ISO": "DZ", "Format": "NNNNN", "Regex": "^\\d{5}$" }, { "Note": "U.S. ZIP codes (range 96799)", "Country": "American Samoa", "ISO": "AS", "Format": "NNNNN (optionally NNNNN-NNNN or NNNNN-NNNNNN)", "Regex": "^\\d{5}(-{1}\\d{4,6})$" }, { "Note":
@ignamiranda
ignamiranda / Reddit Private Post Redirector.user.js
Last active August 2, 2023 11:55
Redirects to Wayback Machine archive of private Reddit posts and subreddits with user confirmation
// ==UserScript==
// @name Reddit Private Post Redirector
// @namespace ignamiranda
// @version 1.1
// @description Redirects the "Browse Reddit" button to the Wayback Machine archive of a private Reddit post or subreddit
// @author Ignacio Miranda
// @match https://www.reddit.com/*
// @grant GM_addStyle
// ==/UserScript==
@cirrusUK
cirrusUK / config
Last active August 5, 2023 03:59
newsboat config
# ░░░░░░ ░░░░░░ ░░ ░░ ░░░░░░ ░░░░░░ ░░ ░░░░░░░░ ░░░░░░ ░░ ░░ ░░░░░ ░░░░░░
# ███╗ ██╗███████╗██╗ ██╗███████╗██████╗ ███████╗██╗ ██╗████████╗███████╗██████╗
# ████╗ ██║██╔════╝██║ ██║██╔════╝██╔══██╗██╔════╝██║ ██║╚══██╔══╝██╔════╝██╔══██╗
# ██╔██╗ ██║█████╗ ██║ █╗ ██║███████╗██████╔╝█████╗ ██║ ██║ ██║ █████╗ ██████╔╝
# ██║╚██╗██║██╔══╝ ██║███╗██║╚════██║██╔══██╗██╔══╝ ██║ ██║ ██║ ██╔══╝ ██╔══██╗
# ██║ ╚████║███████╗╚███╔███╔╝███████║██████╔╝███████╗╚██████╔╝ ██║ ███████╗██║ ██║
# ╚═╝ ╚═══╝╚══════╝ ╚══╝╚══╝ ╚══════╝╚═════╝ ╚══════╝ ╚═════╝ ╚═╝ ╚══════╝╚═╝ ╚═╝
# ░░░░░░ ░░░░░░ ░░ ░░ ░░░░░░ ░░░░░░ ░░ ░░░░░░░░ ░░░░░░ ░░ ░░ ░░░░░ ░░░░░░
# ▓▓▓▓▓▓▓▓▓▓
# ░▓ author ▓ cirrus <cirrus@archlinux.info>
@fatihyildizhan
fatihyildizhan / Docker 23 + Traefik 2.9.10 and v1.7 + Let's Encrypt + Github Registry V2 ghcr.io + Updated on 12 April 2023
Last active October 22, 2023 11:58
Docker 23 + Traefik 2.9.10 and v1.7 + Let's Encrypt + Github Registry V2 ghcr.io + Updated on 12 April 2023
Docker 23 + Traefik v2.9.10 and v1.7 + Let's Encrypt + Github Registry V2 ghcr.io + Updated on 12 April 2023
Content:
- Ubuntu 22.04
- Docker Engine 23.0.3
- Docker Compose 2.17.2
- Traefik v1.7.18 with dnsChallenge
- Traefik v2.9.9 with httpChallenge
--
- Github Registry V2 ghcr.io
@fasiha
fasiha / README.md
Last active November 3, 2023 20:40
Set up RTL-SDR, dump1090, and dump978 for ADS-B/TIS-B/FIS-B/UAT on macOS

Introduction

I’m not very familiar with the aviation jargon (see FAA’s ADS-B FAQ), but ADS-B is a next-gen system where aircraft are equipped with transponders that periodically broadcast their own positions and receive the reports from both other aircraft (direct air-to-air) as well as air-traffic control (ATC) ground transmitters.

There are two separate ADS-B radio bands: the commercial aviation (CA) is at 1090 MHz while the general aviation (GA) is at 978 MHz. If I can be permitted a gross generalization—the former corresponds to big commercial jets and the latter to small private aircraft.

Because ADS-B is designed to democratize airspace situational awareness (in contrast to the older setup, like from films, where a central air-traffic controller is coordinating all these aircraft that can’t see each other), we can buy cheap RF receivers to pick up and decode the messages being broadcast by aircraft and ground towers to get our own picture of the

@kdorff
kdorff / moisture-1.yml
Created May 18, 2022 02:32
ESPHome code for moisture sensors
# Reads analog data using an ads1115. Three moisture sensors and a battery sensor.
# Goes to sleep for an hour at a time.
# Uses a helper input_boolean to keep it from going to sleep, in case you want to update it.
esphome:
name: moisture-1
platform: ESP32
board: esp32dev
on_boot:
then:
@obscurerichard
obscurerichard / README.md
Created September 17, 2012 22:35
Simulates a low bandwidth, high-latency network connection

slow

This bash script offers quick shortcuts to simulate slower network connections. It is useful when you need to simulate a wireless network on a Linux network server, especially when you are using a virtual machine guest on your local machine or in the cloud.

slow 3G                   # Slow network on default eth0 down to 3G wireless speeds
slow reset                # Reset connection for default eth0 to normal
slow vsat --latency=500ms # Simulate satellite internet  with a high latency
slow dsl -b 1mbps         # Simulate DSL with a slower speed than the default

slow modem-56k -d eth0 # Simulate a 56k modem on the eth1 device. eth0 is unchanged.

@vidia
vidia / nginx-unificontroller.conf
Last active January 1, 2024 18:08
Example, working, NGINX config for proxying to Unifi Controller software and using letsencrypt. Includes websocket fix.
# I had a bit of trouble getting my unifi controller (hosted offsite) to use a proxy/letsencrypt. So here are the fruits of my labor.
# The unifi default port is 8443 running on localhost.
# License: CC0 (Public Domain)
server {
# SSL configuration
#
listen 443 ssl default_server;
listen [::]:443 ssl default_server;
# How to install:
# pre-commit install --install-hooks && pre-commit install --install-hooks -t commit-msg
# How temporary skip one of hooks: https://pre-commit.com/#temporarily-disabling-hooks
repos:
#######
# ALL #
#######