Skip to content

Instantly share code, notes, and snippets.

@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 / 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@gmail.com
email=<>
## the zone (domain) should be modified; e.g. example.com
zone_name=example.com
@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.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 / 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_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 / bottomnavbar.dart
Created January 16, 2023 18:32 — forked from maheshmnj/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
* -----
*/