Skip to content

Instantly share code, notes, and snippets.

@thomastthai
thomastthai / bottomnavbar.dart
Created January 16, 2023 18:32 — forked from maheshj01/bottomnavbar.dart
Everything about the Nested bottom navigation bar
/*
* File: main.dart
* Project: BottomNavigationBar demo
* File Created: Wednesday, 26th May 2022 1:15:47 pm
* Author: Mahesh Jamdade
* -----
* Last Modified: Saturday, 28th May 2022 4:42:07 pm
* Modified By: Mahesh Jamdade
* -----
*/
@thomastthai
thomastthai / cloudflare_ddns_update.sh
Created October 27, 2023 07:17 — forked from jooosh/cloudflare_ddns_update.sh
A bash script to update a Cloudflare DNS A record with the external IP of the source machine
# A bash script to update a Cloudflare DNS A record with the external IP of the source machine
# Used to provide DDNS service for my home
# Needs the DNS record pre-creating on Cloudflare
# Proxy - uncomment and provide details if using a proxy
#export https_proxy=http://<proxyuser>:<proxypassword>@<proxyip>:<proxyport>
# Cloudflare zone is the zone which holds the record
zone=example.com
# dnsrecord is the A record which will be updated
@thomastthai
thomastthai / cloudflare-ddns-update.sh
Created October 27, 2023 07:42 — forked from Tras2/cloudflare-ddns-update.sh
A bash script to update a Cloudflare DNS A record with the external IP of the source machine
#!/bin/bash
# A bash script to update a Cloudflare DNS A record with the external IP of the source machine
# Used to provide DDNS service for my home
# Needs the DNS record pre-creating on Cloudflare
# Proxy - uncomment and provide details if using a proxy
#export https_proxy=http://<proxyuser>:<proxypassword>@<proxyip>:<proxyport>
# Cloudflare zone is the zone which holds the record
@thomastthai
thomastthai / cloudflare-ddns.sh
Created October 27, 2023 07:50 — forked from matiasba/cloudflare-ddns.sh
Bash script for DDNS using cloudflare DNS service, with options for enabling https proxy
#!/bin/bash
# A bash script to update a Cloudflare DNS A record with the external IP of the source machine
# Used to provide DDNS service from anywhere
# DNS redord needs to be pre-created on Cloudflare
# Proxy - uncomment and provide details if using a proxy
#export https_proxy=http://<proxyuser>:<proxypassword>@<proxyip>:<proxyport>
# Cloudflare zone is the zone which holds the record
@thomastthai
thomastthai / gist:83c73e508bcac01cdaee7fcbd9e7b581
Created November 14, 2023 20:36 — forked from jauderho/gist:6b7d42030e264a135450ecc0ba521bd8
HOWTO: Upgrade Raspberry Pi OS from bullseye to bookworm
### WARNING: READ CAREFULLY BEFORE ATTEMPTING ###
#
# Credit to anfractuosity and fgimenezm for figuring out additional details for kernels
#
# Make sure everything is up-to-date
sudo apt-get update && sudo apt-get dist-upgrade
# Point to bookworm repos instead
sudo sed -i -e 's/bullseye/bookworm/g' /etc/apt/sources.list
@thomastthai
thomastthai / cloudflare-ddns-update.sh
Created February 19, 2024 22:56 — forked from devinderaujla/cloudflare-ddns-update.sh
A bash script to update a Cloudflare DNS A record with the external IP of the source machine
#!/bin/bash
# based on https://gist.github.com/Tras2/cba88201b17d765ec065ccbedfb16d9a
# initial data; they need to be filled by the user
#### Added multiple sub domains and proxy state set options
## API token; e.g. FErsdfklw3er59dUlDce44-3D43dsfs3sddsFoD3
api_token=<>
## the email address associated with the Cloudflare account; e.g. [email protected]
email=<>
## the zone (domain) should be modified; e.g. example.com
zone_name=example.com
@thomastthai
thomastthai / go_router_example.dart
Created March 30, 2024 07:35 — forked from onatcipli/go_router_example.dart
go_router_example.dart
import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';
main() {
CustomNavigationHelper.instance;
runApp(const App());
}
class App extends StatelessWidget {
const App({Key? key}) : super(key: key);
@thomastthai
thomastthai / .tmux.conf
Created August 28, 2024 06:50 — forked from ivanalejandro0/.tmux.conf
Tmux configuration file with Powerline-like status bar, system clipboard integration and some other nice tweaks.
# Install tpm + plugins with:
# git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
# trigger plugin install with: prefix + I
# trigger plugin update with: prefix + U
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'laktak/extrakto'
#!/bin/sh
# requirements
# - wget
# prepare directory
mkdir -p ~/.local/bin
mkdir -p ~/.config
if ! [ -x "$(command -v tmux)" ]; then

Karabiner layouts for symbols and navigation

Gavin Sinclair, January 2022

Introduction

I use Karabiner (configured with Gosu) to make advanced key mappings on my Apple computer. Karabiner allows you to create “layers”, perhaps simulating those on a programmable mechanical keyboard. I make good use of these layers to give me easy access (home-row or nearby) to all symbols and navigational controls, and even a numpad.

The motivation is to keep hand movement to a minimum. Decades of coding on standard keyboards has unfortunately left me with hand and wrist pain. I will soon enough own a small split keyboard which will force me to use layers to access symbols etc., so this Karabiner solution, which has evolved over months, is a training run for that.