Skip to content

Instantly share code, notes, and snippets.

View djsmiley2k's full-sized avatar

Tim Bowers djsmiley2k

View GitHub Profile
@taldanzig
taldanzig / osxvpnrouting.markdown
Created January 24, 2013 22:14
Routing tips for VPNs on OS X

Routing tips for VPNs on OS X

When VPNs Just Work™, they're a fantastic way of allowing access to a private network from remote locations. When they don't work it can be an experience in frustration. I've had situations where I can connect to a VPN from my Mac, but various networking situations cause routing conflicts. Here are a couple of cases and how I've been able to get around them.

Specific cases

Case 1: conflicting additional routes.

In this example the VPN we are connecting to has a subnet that does not conflict with our local IP, but has additional routes that conflict in some way with our local network's routing. In my example the remote subnet is 10.0.x.0/24, my local subnet is 10.0.y.0/24, and the conflicting route is 10.0.0.0/8. Without the later route, I can't access all hosts on the VPN without manually adding the route after connecting to the VPN:

@dkoloditch
dkoloditch / vpn_split_tunneling_script.sh
Created January 31, 2017 19:27
OS X Cisco IPSEC VPN Post-Connection Split-Tunneling Script
#! /usr/bin/env bash
# per http://www.shadabahmed.com/blog/2013/08/11/split-tunneling-vpn-routing-table/
if (( EUID != 0 )); then
echo "Please, run this command with sudo" 1>&2
exit 1
fi
WIRELESS_INTERFACE=en0
TUNNEL_INTERFACE=utun0
GATEWAY=$(netstat -nrf inet | grep default | grep $WIRELESS_INTERFACE | awk '{print $2}')
@tadly
tadly / enpass-vesion-check.sh
Last active February 25, 2020 12:19
Check for the latest version of enpass
#!/usr/bin/env bash
curl --silent https://apt.enpass.io/dists/stable/main/binary-amd64/Packages.gz -o /tmp/enpass-packages.gz
gunzip /tmp/enpass-packages.gz
cat /tmp/enpass-packages | egrep "Package|Version|SHA256" | head -n 3
rm /tmp/enpass-packages
@allquixotic
allquixotic / blah.md
Last active March 6, 2020 18:26
Duty Calls

https://xkcd.com/386/

RE: https://superuser.com/a/1311054/144607

Thanks for the detailed information, but I want to address the fact this is "mis-information" and I do not agree with your stance on this topic. I disagree with the advice given to this individual.I am not sure whether it is because you are an avid supporter of UEFI, or you

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Some notes on transparency in social systems

This is the PC sitting on my desk right now:

...as you can see, it is literally transparent - you can look right into it! The components and physical connections between them, laid bare - they even put stupid lights on many of the components now, anticipating this level of transparency. Must be pretty easy to see how it works, right?

Well, no, of course not. Most of the interesting stuff is still obscured, happening at an atomic level inside what are literal black boxes. The layer at which it is transparent is irrelevant to most of the problems I might have to solve. When discussing the potential benefits of, costs of, and need for transparency in a system, it is critical to first establish the layer being discussed - otherwise, you may very well end up with a gaudy display that serves no real purpose. This is as true in social systems as it is in physical ones such as

#!/usr/bin/python3
# Display status of VPNs terminated within NSX
# Created Jul 2020
# Tim Bowers
# Rewritten by Cheaterman (Guillaume Brun) for Smiley (Tim Bowers)
import argparse
import datetime
import contextlib
@andrebrait
andrebrait / keychron_linux.md
Last active July 20, 2024 21:06
Keychron keyboards on Linux + Bluetooth fixes

Here is the best setup (I think so :D) for K-series Keychron keyboards on Linux.

Note: many newer Keychron keyboards use QMK as firmware and most tips here do not apply to them. Maybe the ones related to Bluetooth can be useful, but everything related to Apple's keyboard module (hid_apple) on Linux, won't work. As far as I know, all QMK-based boards use the hid_generic module instead. Examples of QMK-based boards are: Q, Q-Pro, V, K-Pro, etc.

Most of these commands have been tested on Ubuntu 20.04 and should also work on most Debian-based distributions. If a command happens not to work for you, take a look in the comment section.

Make Fn + F-keys work (NOT FOR QMK-BASED BOARDS)

Older Keychron keyboards (those not based on QMK) use the hid_apple driver on Linux, even in the Windows/Android mode, both in Bluetooth and Wired modes.