Skip to content

Instantly share code, notes, and snippets.

View jakobottar's full-sized avatar
Makin' Coffee and Ridin' Bikes

Jakob Johnson jakobottar

Makin' Coffee and Ridin' Bikes
View GitHub Profile
@jakobottar
jakobottar / cheatsheet.md
Last active February 22, 2023 21:42
Linux command cheatsheet

ssh keys

get ssh public keys from GitHub

curl https://github.com/username.keys | tee ~/.ssh/authorized_keys

compression

@jakobottar
jakobottar / emacscomm.tex
Last active January 14, 2023 22:15
LaTeX Homework Template
% Math commands by Thomas Minka
\newcommand{\var}{{\rm var}}
\newcommand{\Tr}{^{\rm T}}
\newcommand{\vtrans}[2]{{#1}^{(#2)}}
\newcommand{\kron}{\otimes}
\newcommand{\schur}[2]{({#1} | {#2})}
\newcommand{\schurdet}[2]{\left| ({#1} | {#2}) \right|}
\newcommand{\had}{\circ}
\newcommand{\diag}{{\rm diag}}
\newcommand{\invdiag}{\diag^{-1}}
@jakobottar
jakobottar / private_fork.md
Last active July 8, 2022 20:18 — forked from 0xjac/private_fork.md
Create a private fork of a public repository

The repository for the assignments is public and Github does not allow the creation of private forks for public repositories.

The offical docs for creating a private fork by duplicating the repo are here.

For this class's assignments the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)
    git clone --bare [email protected]:jakobottar/2022fall-image-processing.git
@jakobottar
jakobottar / makecsv
Created March 9, 2022 19:22
simple python script to make CSV files of image/mask directories
#! /usr/bin/python
# https://gist.github.com/jakobottar/34c51039dd36ced8db79458828c07061
import argparse
import os
import csv
parser = argparse.ArgumentParser()
parser.add_argument(
"-d", "--directory", type=str, default="./images/", help="dataset location"
@jakobottar
jakobottar / borg.sh
Last active January 6, 2022 20:31
Borg Backup Script
#!/bin/bash
# Setting this, so the repo does not need to be given on the commandline:
export BORG_REPO=ssh://[email protected]:1985//backups/$HOSTNAME
# Store repo passphrase
export BORG_PASSPHRASE='supersecretpassphrase'
# some helpers and error handling:
info() { printf "\n%s %s\n\n" "$( date )" "$*" >&2; }
@jakobottar
jakobottar / jakobj.zsh-theme
Created May 24, 2021 17:04
oh-my-zsh theme
# Shows the exit status of the last command if non-zero
# Uses "#" instead of "»" when running with elevated privileges
PROMPT="%m %{${fg_bold[red]}%}:: %{${fg[green]}%}%2~ "
# PROMPT+='$(git_prompt_info)%{${fg[blue]}%}»%{${reset_color}%} '
PROMPT+='$(git_prompt_info)%{${fg[blue]}%}»%{${reset_color}%} '
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}(%{$fg[red]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} "
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}📝"
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%}) ✅"