Skip to content

Instantly share code, notes, and snippets.

@smac89
smac89 / instructions.md
Created May 28, 2021 — forked from matthewjberger/instructions.md
Install a nerd font on ubuntu
View instructions.md

1.) Download a Nerd Font

2.) Unzip and copy to ~/.fonts

3.) Run the command fc-cache -fv to manually rebuild the font cache

@smac89
smac89 / nautilus-raw-preview.md
Last active May 10, 2020 — forked from h4cc/howto.md
Show previews of your image files in nautilus file manager in Ubuntu
View nautilus-raw-preview.md

Howto

Install these packages

sudo apt-get install gnome-raw-thumbnailer ufraw-batch

Check to see if everything works, and your thumbnails show up. If not, try the next part.

@smac89
smac89 / immutable-stack.scala
Last active May 4, 2021 — forked from lambda-hacker/immutable-stack.scala
Stack using List [Scala]
View immutable-stack.scala
// Immutable Stack Type using List
case class Stack[A] (elems: Seq[A] = List.empty[A]) {
def push(v: A) : Stack[A] = Stack(v +: elems)
def pushAll(xs: Iterable[A]) : Stack[A] =
xs.foldLeft (this) ((accStack, e) => accStack.push(e))
def pop(): Either[String, (A, Stack[A])] = {
if (isEmpty) Left("Cannot pop from empty stack")