This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import scala.collection.{immutable, mutable, GenTraversableOnce} | |
import scala.collection.generic.CanBuildFrom | |
object GroupableOps { | |
implicit class ToGroupable[A, Coll[X] <: GenTraversableOnce[X]](coll: Coll[A]) { | |
// https://github.com/scala/scala/blob/v2.13.0-M5/src/library/scala/collection/Iterable.scala#L578 | |
def groupMap[K, B, To](key: A => K)(f: A => B) | |
(implicit bf: CanBuildFrom[Coll[A], B, To]): immutable.Map[K, To] = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
inputs = { | |
nixpkgs.url = "github:NixOS/nixpkgs/release-23.05"; | |
}; | |
outputs = { self, nixpkgs }: | |
with nixpkgs.legacyPackages.x86_64-linux; | |
let | |
system = "x86_64-linux"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// return array of [r,g,b,a] from any valid color. if failed returns undefined | |
function colorValues(color) | |
{ | |
if (!color) | |
return; | |
if (color.toLowerCase() === 'transparent') | |
return [0, 0, 0, 0]; | |
if (color[0] === '#') | |
{ | |
if (color.length < 7) |
NOTE: a more up-to-date version of this can be found on my blog
A few days ago, version 1.9 of the Nix package manager was released. From the release notes:
nix-shell can now be used as a #!-interpreter. This allows you to write scripts that dynamically fetch their own dependencies.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bind-key C-b send-prefix | |
bind-key C-o rotate-window | |
bind-key C-z suspend-client | |
bind-key Space next-layout | |
bind-key ! break-pane | |
bind-key " split-window | |
bind-key # list-buffers | |
bind-key $ command-prompt -I #S "rename-session '%%'" | |
bind-key % split-window -h | |
bind-key & confirm-before -p "kill-window #W? (y/n)" kill-window |
OlderNewer