Skip to content

Instantly share code, notes, and snippets.

View smac89's full-sized avatar

Nobleman smac89

View GitHub Profile
smac89 /
Created May 28, 2021 22:05 — forked from matthewjberger/
Install a nerd font on ubuntu

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 /
Last active May 10, 2020 08:11 — forked from h4cc/
Show previews of your image files in nautilus file manager in Ubuntu


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 / immutable-stack.scala
Last active May 4, 2021 18:28 — forked from lambda-hacker/immutable-stack.scala
Stack using List [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")