Skip to content

Instantly share code, notes, and snippets.

View Vincibean's full-sized avatar

Andrew Bessi Vincibean

View GitHub Profile
@Vincibean
Vincibean / VoidLinuxAdventures.md
Last active October 5, 2025 17:10
Void Linux Adventures
sudo xbps-install void-repo-nonfree
sudo xbps-install broadcom-wl-dkms

# if that doesn't work, try this other driver after running:
# sudo xbps-remove broadcom-wl-dkms
sudo xbps-install git
mkdir src
cd src
git clone https://github.com/void-linux/void-packages
@Vincibean
Vincibean / Debian + Wayland (Sway)
Last active November 3, 2024 16:30
Debian + Wayland (Sway)
# Switch to Debian Trixie/testing
xdg-user-dirs-update
sudo apt update
sudo apt install nala
sudo nala install firmware-b43-installer
sudo nala install sway waybar swaylock swayidle swaybg
sudo nala install eza
# replace ls command in .bashrc file with line below
# alias ls='eza -al --long --header --color=always --group-directories-first'
@Vincibean
Vincibean / CharCount.scala
Created May 8, 2018 19:47
Since I keep making the same mistake whenever I propose this exercise: I need Semigroups for this to work!
package org.vincibean.cats.extra
import cats.implicits._
object CharCount extends App {
println(charCount("aaabbc")) // b2a3c1
def charCount(s: String): String = s.map(c => Map(c -> 1))
.reduce(_ combine _)
@Vincibean
Vincibean / my-arch-installation.md
Last active June 13, 2020 01:44
Notes about my Arch installation

My Arch Installation

Tutorial

Follow the installation instruction here and here; if you wish to encrypt your disk (you should!) follow the installation instructions here.

Note
If UEFI is enabled and you have issues with the configuration of the bootloader, you'll need to create a EFI boot partition and then follow the steps relevant for UEFI here and here (an example entry is already in Arch Linux, under /usr/share/systemd/bootctl/arch.conf)
@Vincibean
Vincibean / Sql.scala
Last active November 28, 2017 00:15
A simple (and simplistic) example of how to create a custom String interpolator in Scala: an SQL query interpolator
object Sql {
implicit class SqlInterpolator(val sc: StringContext) extends AnyVal {
def sql(args: Any*): Sql = Sql(sc.parts
.map(StringContext.treatEscapes)
.zipAll(args, "", "")
.map { case (x, y) => x ++ y.toString }
.mkString
)
}
@Vincibean
Vincibean / Twirl.scala
Last active November 28, 2017 00:09
A small Scala (SBT) project to show how to use Twirl to inject code in a JSON template
package org.vincibean.twirl.example
case class Customer(name: String, surname: String)
case class Order(number: Long, product: String)
object Twirl extends App {
println(txt.json(Customer("John", "Doe"), List(Order(1, "Shaver"), Order(2, "Shaving Foam"), Order(3, "Aftershave"))))
}