1.) Download a Nerd Font
2.) Unzip and copy to ~/.fonts
3.) Run the command fc-cache -fv
to manually rebuild the font cache
1.) Download a Nerd Font
2.) Unzip and copy to ~/.fonts
3.) Run the command fc-cache -fv
to manually rebuild the font cache
// 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") |
Date | A | B |
---|---|---|
2016 | Something | ABC |
#!/usr/bin/python3 | |
import math | |
# Taken in part from: https://www.geeksforgeeks.org/python-program-for-basic-and-extended-euclidean-algorithms-2/ | |
def gcdExtended(a, b): | |
""" | |
Calculates the GCD of the two given numbers, as well as the coefficients x and y | |
such that ax + by = gcd(a,b). This is useful in cryptography | |
See: https://en.wikipedia.org/wiki/Extended_Euclidean_algorithm |
Being a Linux desktop user is not easy, but it doesn't have to be difficult.
/etc/systemd/journald.conf
and set Storage=persistent
/** | |
* The MIT License (MIT) | |
* | |
* Copyright (c) 2015 Smac89 | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and | |
* associated documentation files (the "Software"), to deal in the Software without restriction, | |
* including without limitation the rights to use, copy, modify, merge, publish, distribute, | |
* sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is | |
* furnished to do so, subject to the following conditions: |
We love our dark themes on Linux, but unfortunately firefox does not play well with these themes and sometimes you may find that the text is dark on a dark background. The fix for this is to Follow the tips found here:
In order to find out where exo
reads desktop applications from, I had to run the application from my terminal using the command:
strace exo-preferred-applications 2>&1 | grep 'openat.*\.desktop'
This allowed me to identify two folders where exo
reads preferred applications from:
import crypto from 'crypto'; | |
import assert from 'assert'; | |
const header = {"alg":"HS256","typ":"JWT"}; | |
const payload = {"loggedInAs":"admin","iat":1422779638}; | |
const unsignedToken = Buffer.from(JSON.stringify(header)).toString('base64') + | |
'.' + Buffer.from(JSON.stringify(payload)).toString('base64'); | |
const hmac = crypto.createHmac('sha256', 'secretkey'); |