See imgur / linked pastebin and github mirror for 1-8 → 1-8 balancers. Creator: raynquist, github mirror linked in Balancers Illustrated: 1 through 8 balancers explained, imgur album linked in Balancer Book Update (Summer 2019)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Installs NixOS on a Hetzner server, wiping the server. | |
# | |
# This is for a specific server configuration; adjust where needed. | |
# | |
# Prerequisites: | |
# * Update the script to adjust SSH pubkeys, hostname, NixOS version etc. | |
# | |
# Usage: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ pkgs ? import <nixpkgs> {}, runCommandNoCC ? pkgs.runCommandNoCC }: | |
{ | |
name, | |
config, | |
extraMountDirs ? [], | |
extraMountFiles ? [] | |
}: | |
let | |
eval-config = import (pkgs.path + "/nixos/lib/eval-config.nix"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; An example of YNAB-ish envelope budgetting with hledger/ledger | |
; cf https://github.com/simonmichael/hledger/issues/315 | |
; Using accounts like the following: | |
; | |
; assets | |
; business | |
; bank | |
; wf | |
; bchecking |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Sieve { | |
public static void main(String[] args) { | |
int MAX_VALUE = 10000; | |
boolean[] isComposite = new boolean[MAX_VALUE]; | |
isComposite[1] = isComposite[0] = true; | |
for (int i = 2; i*i < MAX_VALUE; i++) { | |
if (!isComposite[i]) { | |
for (int o = i*2; o < MAX_VALUE; o += i) { | |
isComposite[o] = true; | |
} |
_________ _____ _______________ _____
\_ ___ \\ \\___________ \____ / ____\ ~/.bash/cliref.md
/ \ \/| | | || _/ __ \ __\ copy/paste from whatisdb
\ \___|__ |_|_ || | \ __/|_ | http://pastebin.com/yGmGiDQX
\________ /_____ \_||____|_ /____ /_| [email protected]
20160515 \/ 1527 \/ \/ \/
alias CLIRef.txt='curl -s "http://pastebin.com/raw/yGmGiDQX" | less -i'
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# rotate_desktop.sh | |
# | |
# Rotates modern Linux desktop screen and input devices to match. Handy for | |
# convertible notebooks. Call this script from panel launchers, keyboard | |
# shortcuts, or touch gesture bindings (xSwipe, touchegg, etc.). | |
# | |
# Using transformation matrix bits taken from: | |
# https://wiki.ubuntu.com/X/InputCoordinateTransformation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/bash | |
# Usage: push.sh [task] <args> | |
# -- Options -- | |
local_temp_directory=/tmp | |
ssh_host=some-server.asdf | |
screenshot_dir="~/screenshots" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Bitcoin daemon serivce | |
After=network.target | |
[Service] | |
Type=simple | |
User=bitcoin | |
ExecStart=/usr/bin/bitcoind | |
[Install] |
NewerOlder