Skip to content

Instantly share code, notes, and snippets.

View thomaswitt's full-sized avatar
💭
Investing pre-seed/seed into tech startups via @ExpediteVentures

Thomas Witt thomaswitt

💭
Investing pre-seed/seed into tech startups via @ExpediteVentures
View GitHub Profile
@coltenkrauter
coltenkrauter / blocking-traffic-between-vlans-unifi-router.md
Last active September 5, 2024 07:06
This guide provides a detailed step-by-step walkthrough to help you enhance network security by blocking traffic between VLANs on Unifi routers including UDM, UDM-SE, and the Dream Router. Follow these guidelines to create an IP group representing the internal IP ranges according to RFC1918 and configure firewall rules that prioritize blocking t…

Blocking Traffic Between VLANs on Unifi Router (UDM, UDM-SE, Dream Router)

Greetings, network enthusiasts! Today, we are set to embark on an essential task: enhancing the security of your network by blocking traffic between VLANs on Unifi routers such as UDM, UDM-SE, and the Dream Router. Join us as we delve into the nuances of RFC1918 IP ranges and configure firewall rules to safeguard your network effectively.

Table of Contents

  1. Introduction
  2. Why is this Important for Security?
  3. Official Documentation and RFC Links
  4. Instructions
@coltenkrauter
coltenkrauter / crafting-effective-gists.md
Last active September 5, 2024 07:07
This handbook serves as a comprehensive guide for developers, elucidating the process of crafting insightful Gists. Learn how to encapsulate challenges, solutions, and experiences, fostering a vibrant and collaborative knowledge-sharing community.
@ryancdavison
ryancdavison / iPad-Pro-Magic-Keyboard-Portrait-Mode-DIY-Smart-Connector-Cable.md
Last active September 20, 2024 11:05
iPad Pro 12.9 (2020) Magic Keyboard Portrait Mode DIY Smart Connector Cable

iPad Pro 12.9" (2020) Magic Keyboard Portrait Mode DIY Smart Connector Cable

I wanted my iPad Pro to be able to use the Magic Keyboard in portrait mode, but the current Smart Connector configuration does not allow this. With too much time on my hands, I made a short jumper cable using a section of USB cable, 5-pin POGO connectors (the 5-pin works using pins 1, 3, and 5, and removing pins 2 and 4), a small electrical project box, 3mm N52 magnets, and some epoxy and Sugru to pack everything into place. My cable and connections orientation had more to do with the boxes I found to encase the connector (with holes on the small end) than anything else. Obviously, there will be many ways to do this.

WARNING: Getting any of these steps wrong will probably ruin your iPad.

Note: These measurements are for the 12.9" (2020) model. The magnets did not line up and the polarity was different for my wife's iPad Pro 11" (2021).

![iPad-Pro-MmagicKeyboard-Jumper-Cable-min](https://user-images.githubusercontent.c

@ByteSizedMarius
ByteSizedMarius / ExtractSavedPlacesGMaps.md
Last active August 17, 2024 20:32
Google Maps: Extract places from shared list

Edit: This doesn't work for lists > 20 items, because pagination does not work. Please see here

This script allows extracting name and coordinates for gmaps shared lists. It is incredibly unstable and may break anytime. Good luck figuring out why, because the syntax is extremely confusing and basically makes no sense at all. Thanks to google for not providing an api for this after LITERALLY 12 YEARS

How to use this script:

  1. Share a list and open the link in a browser window. It will redirect. The new link will look like this: google.com/maps/@<your coords>/data=....
  2. Take the data-portion and paste it into the following link: https://google.com/maps/@/data=?ucbcb=1
@reanim8ed
reanim8ed / sample.md
Last active July 31, 2024 13:24
[Yubikey setup for SSH] #linux #server #yubikey

Using A Yubikey For SSH Authentication

Intro

Why do we need this?

Answer is simple – Security! Alternatives include storing private keys directly on a workstation – which makes them poorly protected in multitude of attacks. A better option is to use encrypted usb key but leaving inserted and unsealed usb key for a long time is insecure, while inserting it and removing it back and forth all the time is tedious.

YubiKey suits much better for this purpose by making your SSH keys much more secure while maintaining a great user experience.

What is Yubikey

YubiKey is a hardware security key which provides Universal 2nd Factor (U2F) cryptographic tokens through a USB and/or NFC interface. This means you have to explicitly authorize a new SSH session by tapping the YubiKey. The private SSH key should be useless to a malicious user who does not have access to the physical YubiKey on which the second private key is stored.

@L0g0ff
L0g0ff / ddrescue.md
Created December 16, 2021 07:52 — forked from mraspor/ddrescue.md
Guide to Using DDRescue to Recover Data

Guide to Using DDRescue to Recover Data

Start command:

ddrescue -d /dev/sda output.img output.mapfile

NOTE: If direct disc access is not available in your system, try raw devices.

@samuelkordik
samuelkordik / readinglist_pinboard.py
Last active February 16, 2023 07:23
Sync Safari Reading List bookmarks to Pinboard
#!/Users/samuelkordik/.pyenv/shims/python
# ReadingListCatcher
# - A script for exporting Safari Reading List items to Markdown and Pinboard
# Originally by Brett Terpstra 2015, <https://brettterpstra.com/2015/01/06/reading-list-catcher/>
# Modifications by Zach Fine made in 2020 to use the original reading list item in the
# posts to pinboard.
# Updated 2021-06-21 by Samuel Kordik to fix errors due to deprecated API in plistlib,
# changes to Pinboard api and Pinboard python lib; added enhanced logging output
# and error handling to work as a cron job or shell script.
# Uses code from <https://gist.github.com/robmathers/5995026>
@andypiper
andypiper / ish-apks.txt
Last active August 26, 2024 09:12
Setup iSH / Alpine Linux on iPad
# edit the login message
vi /etc/motd
# switch to usable repos - iSH defaults often failed with EOF errors
echo https://dl-cdn.alpinelinux.org/alpine/v3.13/main > /etc/apk/repositories
echo https://dl-cdn.alpinelinux.org/alpine/v3.13/community >> /etc/apk/repositories
# install some basics
apk add zsh bash
apk add sed attr dialog dialog-doc bash bash-doc bash-completion grep grep-doc
@flxkid
flxkid / alarm_status.py
Created September 5, 2020 19:48
Script to read ring alarm state
#!/usr/bin/python
from enum import Enum
import time
import requests
import RPi.GPIO as GPIO
# For this package see gist: https://gist.github.com/flxkid/2c8af86d51dc3532b6e0a085b8727e48
from TCS34725 import TCS34725
from colormath.color_objects import sRGBColor, LabColor
from colormath.color_conversions import convert_color
@andreibosco
andreibosco / yubikey-windows10.md
Last active August 7, 2024 10:17
Setting up Yubikey with SSH and Git on Windows 10 + Powershell