:tabnew
- new blank tab:tabedit [file]
- open file in tab
gt
(:tabn
) - next tab
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); |
{-# 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: >- |
#!/usr/bin/python3 | |
# -*- coding: utf-8 -*- | |
# Copyright (c) Rau Systemberatung GmbH (rausys.de) | |
# MIT License | |
# credits: https://pyimagesearch.com/start-here/ | |
import argparse | |
import os | |
from datetime import datetime, timedelta |
defmodule DateTimeParser do | |
@mapping %{ | |
"H" => "(?<hour>\\d{2})", | |
"I" => "(?<hour12>\\d{2})", | |
"M" => "(?<minute>\\d{2})", | |
"S" => "(?<second>\\d{2})", | |
"d" => "(?<day>\\d{2})", | |
"m" => "(?<month>\\d{2})", | |
"y" => "(?<year2>\\d{2})", | |
"Y" => "(?<year>-?\\d{4})", |