diff options
-rw-r--r-- | Common/tex/latex/misc/StdObligH2020.cls | 136 | ||||
-rw-r--r-- | Common/tex/latex/misc/texput.log | 21 | ||||
l--------- | Common/tex/tex | 1 | ||||
-rwxr-xr-x | bin/Backup | 13 | ||||
-rwxr-xr-x | bin/fibonacci | 2 | ||||
-rw-r--r-- | mac/tmux.conf | 5 | ||||
-rw-r--r-- | mac/zshrc | 1 |
7 files changed, 172 insertions, 7 deletions
diff --git a/Common/tex/latex/misc/StdObligH2020.cls b/Common/tex/latex/misc/StdObligH2020.cls new file mode 100644 index 0000000..b764361 --- /dev/null +++ b/Common/tex/latex/misc/StdObligH2020.cls @@ -0,0 +1,136 @@ +\NeedsTeXFormat{LaTeX2e} +\ProvidesClass{StdObligH2020}[Klasse som gir oppdatert formatering til obliger for høsten 2020.] +\LoadClass[norsk,11pt,a4paper]{article} +\RequirePackage[T1]{fontenc} +\RequirePackage[utf8]{inputenc} +\RequirePackage[norsk]{babel} + +\usepackage{blindtext} % to quickly get a full document + +\usepackage[hidelinks]{hyperref} +\usepackage[all]{hypcap} +\usepackage{lastpage} +%\usepackage[margin=1in]{geometry} + +\RequirePackage{titling} + +\RequirePackage[dvipsnames]{xcolor} +\usepackage{tabularx} + +\RequirePackage{soul} +\usepackage{amsmath} +\usepackage{amsfonts} +\usepackage{amssymb} +\usepackage{gensymb} +\usepackage{graphicx} +\usepackage{float} +\usepackage{multicol} +\usepackage{colortbl} +\usepackage{xcolor} +\usepackage{svg} +\usepackage{tabularx} +\usepackage{listofitems} +\usepackage{mathtools} +\usepackage{ifthen} +\usepackage{lmodern} +\usepackage{tkz-euclide} +\usetikzlibrary{plotmarks} +\usepackage{pgfplots} + +\usepackage{attachfile} +\usepackage{pdfpages} +\usepackage{booktabs} +\usepackage{tikz} +\usepackage[small,euler-digits]{eulervm} +\usepackage{braket} +\usetikzlibrary{angles, quotes, tikzmark, backgrounds, calc, patterns, scopes} +\usetkzobj{all} + + +\usepackage{listings} + + +\usepackage{graphicx} +\usepackage{caption} +\usepackage{subcaption} + +% Make new thing for draftonly +\usepackage{versions} +\excludeversion{draft} +\newcommand{\isdraft}[0]{ + \includeversion{draft} + %\usepackage{draftwatermark} + %\SetWatermarkText{Utkast} + %\SetWatermarkColor[rgb]{1,0.95,0.95} + %\SetWatermarkScale{2} +} + +% Make styling of header and footer +\usepackage{fancyhdr} % to change header and footers +\pagestyle{fancy} % Turn on the style +\fancyhf{} % Start with clearing everything in the header and footer +\setlength{\headheight}{14pt} +\fancyfoot[R]{\thepage\ av \pageref{LastPage}} +\fancyhead[L]{\theauthor} +\fancyhead[C]{\thetitle} +\fancyhead[R]{\thedate} + +% Redefine plain style, which is used for titlepage and chapter beginnings +% From https://tex.stackexchange.com/a/30230/828 +\fancypagestyle{plain}{ + \renewcommand{\headrulewidth}{0pt} + \fancyhf{} + \fancyfoot[R]{\thepage\ av \pageref{LastPage}} +} + +\usepackage{parskip} % Make paragraphs two line skips instead of indent + +% Make quotes around some text +\newcommand{\quotes}[1]{"#1"} +\newcommand{\q}[1]{"#1"} + +% Make a tuple-command +\newcommand{\tuple}[1]{\left\langle#1\right\rangle} + +% Highlightcommand +\DeclareRobustCommand{\hl}[1]{{\colorbox{yellow}{#1}}} +\DeclareRobustCommand{\hlc}[2]{{\colorbox{#1}{#2}}} + +% Hyber-linkable sections +\newcommand{\hsec}[2]{{\pagebreak\section*{#1}\label{sec:#2}}} +\newcommand*{\refsec}[1]{\hyperref[{sec:#1}]{\ref*{sec:#1} \nameref*{sec:#1}}} +% Hyber-linkable sub_sections +\newcommand{\hsubsec}[2]{{\subsection*{#1}\label{sssec:#2}}} +\newcommand*{\refsubsec}[1]{{\ref{sssec:#1}}} +% Header-safe math +\newcommand{\hsafem}[1]{{\texorpdfstring{#1}{[math]}}} + +% Code +\definecolor{codegreen}{rgb}{0,0.6,0} +\definecolor{codegray}{rgb}{0.5,0.5,0.5} +\definecolor{codepurple}{rgb}{0.58,0,0.82} +\definecolor{backcolour}{rgb}{0.95,0.95,0.92} + +\lstdefinestyle{mystyle}{ + backgroundcolor=\color{backcolour}, + commentstyle=\color{codegreen}, + keywordstyle=\color{magenta}, + numberstyle=\tiny\color{codegray}, + stringstyle=\color{codepurple}, + basicstyle=\ttfamily\footnotesize, + breakatwhitespace=false, + breaklines=true, + captionpos=b, + keepspaces=true, + numbers=left, + numbersep=5pt, + showspaces=false, + showstringspaces=false, + showtabs=false, + tabsize=2 +} + +\lstset{style=mystyle} + +\usepackage[ruled,vlined,linesnumbered]{algorithm2e} +\usepackage{algorithmic} diff --git a/Common/tex/latex/misc/texput.log b/Common/tex/latex/misc/texput.log new file mode 100644 index 0000000..78a89c8 --- /dev/null +++ b/Common/tex/latex/misc/texput.log @@ -0,0 +1,21 @@ +This is pdfTeX, Version 3.14159265-2.6-1.40.18 (TeX Live 2017) (preloaded format=pdflatex 2018.3.9) 3 SEP 2020 19:35 +entering extended mode + restricted \write18 enabled. + %&-line parsing enabled. +**StdOblig.tex + +! Emergency stop. +<*> StdOblig.tex + +*** (job aborted, file error in nonstop mode) + + +Here is how much of TeX's memory you used: + 3 strings out of 492995 + 103 string characters out of 6132705 + 54074 words of memory out of 5000000 + 3658 multiletter control sequences out of 15000+600000 + 3640 words of font info for 14 fonts, out of 8000000 for 9000 + 1141 hyphenation exceptions out of 8191 + 0i,0n,0p,1b,6s stack positions out of 5000i,500n,10000p,200000b,80000s +! ==> Fatal error occurred, no output PDF file produced! diff --git a/Common/tex/tex b/Common/tex/tex new file mode 120000 index 0000000..9412bc9 --- /dev/null +++ b/Common/tex/tex @@ -0,0 +1 @@ +/Users/jakobstendahl/_code/Personal projects/c/microbit-samples/Common/tex
\ No newline at end of file @@ -1,5 +1,5 @@ #!/bin/bash -destination="jmbp@192.168.32.102::jmbp" +destination="jmbp@openmediavault.dmz::jmbp" backupPaths=("Desktop" "Movies" "Music" "Documents" "Pictures" "_code" "Google Drive") spinner() { @@ -28,7 +28,9 @@ clearLines() { tput civis mtmpdir=$(mktemp -d) -printf "Directory for log files: '$mtmpdir'.\n" +mtempfile=$(mktemp) +#printf "Directory for log files: '$mtmpdir'.\n" +printf "\nLogfile: '$mtempfile'.\n" # Run rsync on all the directories error=false @@ -36,12 +38,11 @@ for path in "${backupPaths[@]}"; do # Just print the status-text tput setaf 4 printf "\n%-22s" "$main$path..." - tput sc; tput setaf 8 - printf "\n(tail -f \"$mtmpdir/$path.log\")" - tput sgr0; tput rc; tput el + tput sgr0 + printf "\n\n*********************\nSyncing directory '$path'.\n*********************\n" >> "$mtempfile" # Actually start rsync for the directory - rsync -az --info=all --log-file="$mtmpdir/$path.log" "$path" "$destination" &> /dev/null & + rsync -az --info=all --log-file="$mtempfile" "$path" "$destination" &> /dev/null & rsyncPID=$! trap "kill $rsyncPID 2> /dev/null" EXIT spinner $rsyncPID diff --git a/bin/fibonacci b/bin/fibonacci new file mode 100755 index 0000000..35b86b8 --- /dev/null +++ b/bin/fibonacci @@ -0,0 +1,2 @@ +#!/bin/bash +c=0;p=1;for i in $(seq $1); do t=$c;c=$(expr $c + $p); p=$t; done; echo $c diff --git a/mac/tmux.conf b/mac/tmux.conf index c5b8b55..f0f272a 100644 --- a/mac/tmux.conf +++ b/mac/tmux.conf @@ -42,10 +42,13 @@ bind -n M-Right select-pane -R bind -n M-Up select-pane -U bind -n M-Down select-pane -D +bind-key S-Left swap-window -t -1 +bind-key S-Right swap-window -t +1 + # Bells set -g visual-bell on set -g bell-action any # Scroll in shell set -g terminal-overrides 'xterm*:smcup@:rmcup@' -set -wg xterm-keys 1
\ No newline at end of file +set -wg xterm-keys 1 @@ -40,6 +40,7 @@ export PATH export PATH=/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/usr/local/share/dotnet:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/opt/local/bin:/opt/local/sbin path+=("$(readlink /Users/$DEFAULT_USER/bin)") export path +eval "$(pyenv init -)" # Add aliases alias krak='/Applications/GitKraken.app/Contents/MacOS/GitKraken -p "$(PWD)" &>> /dev/null &' |