Skip to content

Instantly share code, notes, and snippets.

View rwanyoike's full-sized avatar

rwanyoike

  • Nairobi, Kenya
  • 10:23 (UTC +03:00)
  • X @_raywan_
View GitHub Profile
@rwanyoike
rwanyoike / --etc--wireguard--tailscaled.conf
Created October 3, 2024 16:39
Workaround for routing table rules that will work with tailscaled (v1.12.0)
[Interface]
...
# Workaround for routing table rules that will work with tailscaled
# Ref: https://github.com/tailscale/tailscale/blob/v1.12.0/wgengine/router/router_linux.go#L628
# Ref (old): https://github.com/tailscale/tailscale/blob/b87396b/wgengine/router/router_linux.go#L508
FwMark = 0x19999
PostUp = ip -4 rule del not fwmark 0x19999 table 0x19999
PostUp = ip -4 rule add pref 9001 not fwmark 0x19999 table 0x19999
PostUp = ip -4 rule del table main suppress_prefixlength 0
PostUp = ip -4 rule add pref 9000 table main suppress_prefixlength 0
with import <nixpkgs> {}; [
(google-cloud-sdk.withExtraComponents [google-cloud-sdk.components.gke-gcloud-auth-plugin])
]

OpenWrt/LEDE opkg Tips and Tricks

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M

New macOS Setup

  1. Install any available software updates
  2. Enable software update checks
  3. Disable automatic software update downloads
  4. Enable Guest User
  5. Install command line developer tools xcode-select --install
  6. Install homebrew
  7. Setup the dotfiles repo
  8. Install the BrewFile (in dotfiles repo)
{
"title": "Building Awesome CMS",
"content": "<div><div><div class=\"section-content\"><div class=\"section-inner sectionLayout--insetColumn\"><figure id=\"1b95\" class=\"graf graf--figure graf-after--h3\"><img class=\"progressiveMedia-noscript js-progressiveMedia-inner\" src=\"https://cdn-images-1.medium.com/max/800/1*zo51eqdjJ_XSU0D8Vm8P9A.png\"></figure><p id=\"c21b\" class=\"graf graf--p graf-after--figure\"><a href=\"https://github.com/postlight/awesome-cms\" class=\"markup--anchor markup--p-anchor\">Awesome CMS</a> is&#x2026;an awesome list of awesome CMSes. It&#x2019;s on GitHub, so anyone can add to it via a pull request. Here are some notes on how and why it came to be.</p><p id=\"2a96\" class=\"graf graf--p graf-after--h3\">GitHub has a <a href=\"https://help.github.com/articles/search-syntax/\" class=\"markup--anchor markup--p-anchor\">set of powerful commands</a> for narrowing search results. In seeking out modern content management tools, I used queries like this:</p><p id=\"5c79\" class=\"g
@rwanyoike
rwanyoike / nano_development.txt
Created December 13, 2016 22:54
Keep track of nano development
database functions
[x] nano.db.create(name, [callback])
[x] nano.db.get(name, [callback])
[x] nano.db.destroy(name, [callback])
[x] nano.db.list([callback])
[x] nano.db.compact(name, [designname], [callback])
[x] nano.db.replicate(source, target, [opts], [callback])
[ ] nano.db.changes(name, [params], [callback])
[ ] nano.db.follow(name, [params], [callback])
@rwanyoike
rwanyoike / correct_jap_mp3.py
Last active July 15, 2017 19:20
Correct Shift JIS encoded MP3s, and convert them to ID3 v2.4 while at it
#!/usr/bin/env python
import glob
import logging
import eyed3
def moolala(tag):
try:
return tag.encode("latin1").decode("shiftjis")
@rwanyoike
rwanyoike / simple_ip_scan.sh
Last active August 29, 2015 14:23
Simple IP scan
#!/usr/bin/env bash
for ip in 192.168.0.{1..254}; do
ping -c 1 -W 1 $ip | grep "64 bytes" &
done
@rwanyoike
rwanyoike / huawei_unlock.py
Last active July 15, 2017 19:13
Calculates unlock codes for Huawei modems; see: https://github.com/mcphail/linux_huawei_unlocker
#!/usr/bin/env python
#
# Copyright 2010: dogbert <[email protected]>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
@rwanyoike
rwanyoike / pacman_disowned.sh
Last active August 29, 2015 14:13
Identify files not owned by any package
#!/usr/bin/env sh
tmp=${TMPDIR-/tmp}/pacman-disowned-$UID-$$
db=$tmp/db
fs=$tmp/fs
mkdir "$tmp"
trap 'rm -rf "$tmp"' EXIT
pacman -Qlq | sort -u > "$db"