Skip to content

Instantly share code, notes, and snippets.

View BuddhiLW's full-sized avatar

blw BuddhiLW

View GitHub Profile
@BuddhiLW
BuddhiLW / fontfor
Created July 16, 2024 18:43
Install fontfor program
#!/usr/bin/bash
cargo install -f fontfor
@BuddhiLW
BuddhiLW / doom
Created July 16, 2024 18:43
Install Doom Emacs at dotfiles and symbolically link it
#!/usr/bin/bash
rm -rf $HOME/.emacs.d
git clone --depth 1 https://github.com/doomemacs/doomemacs $HOME/.emacs.d
$HOME/.emacs.d/bin/doom install
rm -rf $HOME/.doom.d
ln -sf $HOME/dotfiles/.doom.d $HOME
@BuddhiLW
BuddhiLW / nibbler
Created July 16, 2024 18:39
Install Nibbler (Chess analysis application)
#!/bin/bash
curl -L https://raw.githubusercontent.com/rooklift/nibbler/master/files/scripts/install.sh | bash
@BuddhiLW
BuddhiLW / lc0
Created July 16, 2024 18:38
Install lc0 (Leela Chess Zero)
#!/bin/bash
### The directory you want to install LC0 at:
cd $DOTFILES/gitthings/
git clone -b release/0.29 --recurse-submodules https://github.com/LeelaChessZero/lc0.git
cd lc0
./build.sh
@BuddhiLW
BuddhiLW / emacs
Created July 16, 2024 18:11
Emacs source install with native compilation (up to 10x speedup)
#!/usr/bin/bash
## Change this to where you want to build fetch and build emacs at.
cd $DOTFILES/gitthings/
git clone https://github.com/emacs-mirror/emacs.git
sudo apt-get update
# add-apt-repository ppa:ubuntu-toolchain-r/ppa
@BuddhiLW
BuddhiLW / group-and-keywordize-by-key.clj
Created May 18, 2023 18:44
Group and keywordize data, with Clojure (useful for requests with ids as strings)
;; keywordize-at-keys: https://gist.github.com/vvvvalvalval/d31f8980045f3da3b3415092f6db32b6
(defn associate-by [f coll]
(into {} (map (juxt f identity) coll)))
(defn associate-by-kkeyword-value
"Associate by key the key-work values and transform key to keyword, as well as it's value.
Generally, used for grouping data by the unique values in a coll, coming from requests."
[key coll]
(->> coll