sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
- Download zsh-autosuggestions by
| using System; | |
| namespace PiDay | |
| { | |
| // The probability of two random numbers to be coprime is P = 6 / Pi^2 | |
| // So let's generate a bunch of random numbers. Figure out how often they're coprime. | |
| // Use that percentage as our probabilty and solve for Pi. | |
| // Pi = sqrt(6 / P) | |
| // For more info, watch the video where I stole the idea: https://youtu.be/RZBhSi_PwHU |
| import { v4 as uuid } from 'uuid'; | |
| export function generateId() { | |
| return uuid(); | |
| } | |
| const v4 = new RegExp(/^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i); | |
| console.log(generateId().match(v4)); | |
| //console.log(generateId().length) |
| function transfer | |
| if test (count $argv) -eq 0 | |
| echo "No arguments specified. Usage:\necho transfer /tmp/test.md\ncat /tmp/test.md | transfer test.md" | |
| return 1 | |
| end | |
| ## get temporarily filename, output is written to this file show progress can be showed | |
| set tmpfile ( mktemp -t transferXXX ) | |
| ## upload stdin or file |
| # Install ARCH Linux with encrypted file-system and UEFI | |
| # The official installation guide (https://wiki.archlinux.org/index.php/Installation_Guide) contains a more verbose description. | |
| # Download the archiso image from https://www.archlinux.org/ | |
| # Copy to a usb-drive | |
| dd if=archlinux.img of=/dev/sdX bs=16M && sync # on linux | |
| # Boot from the usb. If the usb fails to boot, make sure that secure boot is disabled in the BIOS configuration. | |
| # Set swedish keymap |
| # Generic Makefile for compiling an executable, with pkg-config dependencies. | |
| CC := clang | |
| PKGS := gtk+-3.0 | |
| SRCDIR := src | |
| BUILDDIR := build | |
| CFLAGS := -g -Wall `pkg-config --cflags $(PKGS)` | |
| LIBS := `pkg-config --libs $(PKGS)` | |
| TARGET := app |