:tabnew
- new blank tab:tabedit [file]
- open file in tab
gt
(:tabn
) - next tab
-- SELECT gen_prefixed_id('account_', 20); | |
-- account_9f2oOuK23Xpv3rdtHnQY | |
-- Example usage in a table column definition: | |
-- id text DEFAULT gen_prefixed_id('account_', 16) PRIMARY KEY | |
-- Load the built-in pgcrypto module if not loaded. | |
CREATE EXTENSION IF NOT EXISTS pgcrypto; | |
-- Create a function that takes a text prefix and the length of the |
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); |
How to set up WireGuard as an iOS VPN configuration in order to tunnel all traffic from an iOS or iPadOS device through a Linux server.
While there are many configurations possible, my intentation was to secure the traffic from my iOS device by routing it securely through a Linux server. As such, this HowTo will show you how to set-up an initial working configuration, which you can customize afterward.
Most likely things will be missing, such as how to configure the firewall or the init
scripts on your Linux distribution. As it won't be possible to cover all Linux
flavors this HowTo
will attempt to give you a working WireGuard
configuration, leaving it up to you to fill-in the blanks. Feel free to write a comment to touch upon your specific situation to help others that might stumble upon this HowTo :)
Note: In these configuration examples I use
10.8.0.1/24
and10.8.0.2/24
. However, as WireGuard IPs may not overlap your other network interfaces
{-# LANGUAGE TypeSynonymInstances #-} | |
data Dual d = D Float d deriving Show | |
type Float' = Float | |
diff :: (Dual Float' -> Dual Float') -> Float -> Float' | |
diff f x = y' | |
where D y y' = f (D x 1) | |
class VectorSpace v where | |
zero :: v |
Sometimes we need to add redundancy to some service or server which happen to be a public-facing entry point of our infrastructure. For example, imagine we want to add a high availability pair for a load balancer which sits on the edge of network and forwards traffic to alive backend servers.
┌─────────────┐
│ │
┌─────►│ Backend 1 │
│ │ │
│ └─────────────┘
This procedure was tested on FreeBSD-CURRENT build from d8819d88af52.
# sysrc linux_enable="YES"
# service linux start
# pkg install linux_base-c7
# to add to your ~/.bashrc or your ~/.zshrc file. Usage: $ go switch 1.18.1 | |
function go() { | |
case $* in | |
switch* ) | |
shift 1 | |
gobindir=$(go env GOBIN) | |
# adapt to a valid directory at the beginning of your $PATH if you're not on systemd | |
homebindir=$(systemd-path user-binaries) | |
go install golang.org/dl/go"$@"@latest | |
$gobindir/go"$@" download |
blueprint: | |
name: Update notifications | |
description: Send notifications for new updates and install or skip on action | |
homeassistant: | |
min_version: '2022.4.0' | |
domain: automation | |
input: | |
update_entities: | |
name: Update entities | |
description: >- |