- Open https://fly.io and register
- Open https://login.tailscale.com/admin/settings/keys to
Generate auth key
, pickReusable
+Ephemeral
$ brew install flyctl
$ flyctl auth login
// 3D Dom viewer, copy-paste this into your console to visualise the DOM as a stack of solid blocks. | |
// You can also minify and save it as a bookmarklet (https://www.freecodecamp.org/news/what-are-bookmarklets/) | |
(() => { | |
const SHOW_SIDES = false; // color sides of DOM nodes? | |
const COLOR_SURFACE = true; // color tops of DOM nodes? | |
const COLOR_RANDOM = false; // randomise color? | |
const COLOR_HUE = 190; // hue in HSL (https://hslpicker.com) | |
const MAX_ROTATION = 180; // set to 360 to rotate all the way round | |
const THICKNESS = 20; // thickness of layers | |
const DISTANCE = 10000; // ¯\\_(ツ)_/¯ |
#!/bin/bash | |
# This script will backup your Coolify instance and move everything to a new server. Docker volumes, Coolify database, and ssh keys | |
# 1. Script must run on the source server | |
# 2. Have all the containers running that you want to migrate | |
# Configuration - Modify as needed | |
sshKeyPath="$HOME/.ssh/your_private_key" # Key to destination server | |
destinationHost="server.example.com" |
/.git |
Generate auth key
, pick Reusable
+Ephemeral
$ brew install flyctl
$ flyctl auth login
#!/usr/bin/env bash | |
# | |
# Author: @nikolaizujev | |
# | |
# Big respect to @mholt6 for making Caddy | |
# | |
# This script is based on: | |
# - https://www.calhoun.io/building-caddy-server-from-source/ | |
# - https://g.liams.io/liam/simple-build-caddy.git | |
# |
// TxFunc is a function that can be wrapped in a transaction | |
type TxFunc func(tx *sql.Tx) error | |
// WithTx wraps a function in an sql transaction. After the function returns, the transaction is | |
// committed if there's no error, or rolled back if there is one. | |
func WithTx(db *sql.DB, f TxFunc) (err error) { | |
tx, err := db.Begin() | |
if err != nil { | |
return err | |
} |
It "types" the contents of the clipboard.
Why can't you just paste the contents you ask? Sometimes pasting just doesn't work.
The Windows version is written in AutoHotKey and easily compiles to an executable. It's a single line script that maps Ctrl-Shift-V to type the clipboard.
- Open Automator | |
- File -> New -> Service | |
- Change "Service Receives" to "files or folders" in "Finder" | |
- Add a "Run Shell Script" action | |
- Change "Pass input" to "as arguments" | |
- Paste the following in the shell script box: open -n -b "com.microsoft.VSCode" --args "$*" | |
- Save it as something like "Open in Visual Studio Code" |
function godir { | |
if [ -z "$1" ] | |
then | |
cd $GOPATH/src | |
else | |
if [ "$1" == "reload" ] | |
then | |
_go_package_names=( $(go list all) ) | |
else | |
cd $GOPATH/src/$1 |
// You don't want to serve HTTPS supporting for SSL3.0 any longer, see: | |
// http://googleonlinesecurity.blogspot.de/2014/10/this-poodle-bites-exploiting-ssl-30.html | |
import ( | |
"crypto/tls" | |
"net/http" | |
) | |
// This code supports SSL3.0, TLS1.0, TLS1.1 and TLS1.2 | |
// Chances are you currently do this but want to stop due to the POODLE | |
err := http.ListenAndServeTLS(addr, "crtfile", "keyfile", handler) |