Skip to content

Instantly share code, notes, and snippets.

View jaantollander's full-sized avatar

Jaan Tollander de Balsch jaantollander

View GitHub Profile
@jaantollander
jaantollander / accounts.txt
Created August 14, 2022 06:25 — forked from simonmichael/accounts.txt
a sample *ledger chart of accounts (first 3 levels): combined personal & business, eg for a freelancer
assets
business
accounts receivable
bank
personal
accounts receivable
bank
cash
gifts
online
# OBJECTIVE: Install Arch Linux with encrypted root and swap filesystems with an ENCRYPTED BOOT and boot from UEFI. We will
also decrypt and mount our entire encrypted system using a single LUKS passphrase entry.
# Note: This method supports both dedicated Arch installs and those who wish to install Arch on a multi-OS-UEFI booting system.
# External USB HDD/SSD Installers Notes: Encrypted Arch installs can be booted and run from an external USB HDD or SSD, but
# only when the installation is correctly set up. There are several necessary changes to my standard procedure you'll want
# to make during the install process. Read my External USB HDD/SSD Installation section below before proceeding.
@jaantollander
jaantollander / 01_multiple_dispatch.jl
Last active August 31, 2023 07:10
Multiple dispatch in Julia language
module MultipleDispatch
export A, A1, A2, f
# Abstract type
abstract type A end
# Concrete types
struct A1 <: A end
struct A2 <: A end
@jaantollander
jaantollander / pkg.jl
Last active September 15, 2021 06:08
Template for creating a Julia package with PkgTemplates.jl to current working directory.
using PkgTemplates
template = Template(;
user="jaantollander",
authors="Jaan Tollander de Balsch",
julia=v"1.6",
dir=".",
plugins=[
License(; name="MIT"),
GitHubActions(),
Documenter{GitHubActions}(),
@jaantollander
jaantollander / .bashrc
Created August 10, 2021 04:35
Adding to PATH in idempotent way, that is, without repetition.
# https://unix.stackexchange.com/a/124447
add_to_path() {
case ":${PATH:=$1}:" in *:"$1":*) ;; *) PATH="$1:$PATH" ;; esac;
}
# Example
add_to_path $HOME/bin/julia-1.6.1/bin
@jaantollander
jaantollander / install_julia.sh
Created July 23, 2021 08:15
Example of how to download and install Julia Language to home directory from the command line.
# You can choose a Julia release from https://julialang.org/downloads/
# Set URL for downloading Julia binaries
JULIA_URL="https://julialang-s3.julialang.org/bin/linux/x64/1.6/julia-1.6.2-linux-x86_64.tar.gz"
# Set name for the downloaded archive
JULIA_ARCHIVE="~/julia.tar.gz"
# Download the Julia language binaries
curl -o ${JULIA_ARCHIVE} ${JULIA_URL}
@jaantollander
jaantollander / value_based_dispatch.jl
Last active July 25, 2021 07:10
Value-based dispatch in Julia language
module ValueBasedDispatch
export MyType, A, B, C, f
abstract type MyType end
struct A <: MyType end
struct B <: MyType end
struct C <: MyType end
f(::Type{A}) = "Dispatch on argument A"
@jaantollander
jaantollander / sympy_examples.ipynb
Last active October 4, 2023 11:16
SymPy examples.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jaantollander
jaantollander / notes.md
Created December 29, 2017 12:29
Web development course exam practice notes

HTML

Tags & Structure

Basic HTML Structure

<!DOCTYPE html>
<html>
  <head>
    <title>title</title>
    <meta> ... </meta>
    <link> ... </link>
@jaantollander
jaantollander / unicode-math-symbols.csv
Last active October 12, 2022 09:40
List of unicode math symbols (separator uses ^)
We can make this file beautiful and searchable if this error is corrected: It looks like row 7 should actually have 1 column, instead of 2 in line 6.
# Unicode characters and corresponding LaTeX math mode commands
# *************************************************************
#
# :Copyright: © 2011 Günter Milde
# :Date: Last revised 2011-11-08
# :Licence: This work may be distributed and/or modified under the
# conditions of the `LaTeX Project Public License`_,
# either version 1.3 of this license or (at your option)
# any later version.
#