Skip to content

Instantly share code, notes, and snippets.

View logc's full-sized avatar

Luis Osa logc

View GitHub Profile
@logc
logc / fib.nim
Created April 10, 2018 09:27
How to call Nim from Racket
proc fib(a: cint): cint {.exportc, dynlib.} =
if a <= 2:
result = 1
else:
result = fib(a - 1) + fib(a - 2)
@logc
logc / booklet.tex
Created February 13, 2019 09:42
Reorder pages of a PDF file so that it can be printed as a booklet
\documentclass{scrartcl}
\usepackage{pdfpages}
\begin{document}
%% Edit the name of the PDF file
\includepdf[pages=-,booklet,landscape]{another.pdf}
\end{document}
@logc
logc / mkscala.fish
Created April 26, 2019 15:26
Create a Scala project from Fish shell
function mkscala --argument proj org tld
set -q tld[1]
or set tld "com"
set -q org[1]
or set org "example"
echo "Creating a Scala project called" $proj
mkdir -p $proj/{project,src}
mkdir -p $proj/src/{main,test}/{java,scala,resources}
mkdir -p $proj/src/{main,test}/scala/$tld/$org/$proj
@logc
logc / cal.tex
Created January 19, 2020 14:02
Yearly planner calendar
\documentclass[14pt]{scrartcl}
%% Translate month names
\usepackage[spanish]{babel}
\usepackage[spanish]{translator}
\usepackage{tikz}
\usetikzlibrary{calendar}

Template

Heading