Skip to content

Instantly share code, notes, and snippets.

snippet template "Basic template" b
\documentclass[a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{textcomp}
\usepackage[dutch]{babel}
\usepackage{amsmath, amssymb}
\begin{document}
@nhap69
nhap69 / zathu
Created November 25, 2018 23:54 — forked from michaelmrose/zathu
zathura config
# Zathura configuration file
# See man `man zathurarc'
# Open document in fit-width mode by default
set adjust-open "best-fit"
# One page per row by default
set pages-per-row 1
#stop at page boundries
@nhap69
nhap69 / README.md
Created May 29, 2018 01:31 — forked from hbpasti/README.md
fontawesome with i3status

fontawesome with i3status

This is my i3 config, using FontAwesome icons for i3status.

Save files to ~/.i3.

@nhap69
nhap69 / zshrc
Created November 19, 2017 05:48 — forked from mystelynx/zshrc
zgen with prezto
# zgen
export ZGEN_RESET_ON_CHANGE=($HOME/.zshrc)
source $HOME/src/github.com/tarjoilija/zgen/zgen.zsh
if ! zgen saved; then
echo "Creating a zgen save"
zgen prezto editor key-bindings 'emacs'
zgen prezto prompt theme 'sorin'
@nhap69
nhap69 / tmux.conf
Created September 9, 2016 17:01 — forked from spicycode/tmux.conf
The best and greatest tmux.conf ever
# 0 is too far from ` ;)
set -g base-index 1
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
#set -g default-terminal screen-256color
set -g status-keys vi
set -g history-limit 10000
@nhap69
nhap69 / TrueColour.md
Created September 2, 2016 19:10 — forked from XVilka/TrueColour.md
True Colour (16 million colours) support in various terminal applications and terminals

Colours in terminal

It's a common confusion about terminal colours... Actually we have this:

  • plain ascii
  • ansi escape codes (16 colour codes with bold/italic and background)
  • 256 colour palette (216 colours + 16 ansi + 24 gray) (colors are 24bit)
  • 24bit true colour ("888" colours (aka 16 milion))
printf "\x1b[${bg};2;${red};${green};${blue}m\n"

Desugar Scala Expressions

Use the compiler

scala -Xprint:typer -e "class A(val i: Int)" prints the desugarred expression after the typer phase. Use scala -Xshow-phases to get a list of all phases.

Or use a macro in the REPL

Paste this into a REPL session or in a file loaded with the :load command:

call plug#begin()
Plug 'mbbill/undotree'
nnoremap <F5> :UndotreeToggle<CR>
call plug#end()