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
building '/nix/store/21084lh8071hfcb1rjizgn083ppbn2c5-kernel-modules.drv'... | |
created 19 symlinks in user environment | |
kernel version is 5.4.31 | |
building '/nix/store/2wwqbwyszf80qhvalcjnwfns41zzjb8r-linux-5.4.31-modules.drv'... | |
created 19 symlinks in user environment | |
kernel version is 5.4.31 | |
building '/nix/store/lvv6v9iih20spfjhj5y9m0mcw8r50q64-vimrc.drv'... | |
building '/nix/store/1fxgfrv7n4nfvvhx2abyf7igc93kgh9k-linux-5.4.31-modules-shrunk.drv'... | |
kernel version is 5.4.31 | |
root module: xhci_pci |
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 Criterion.Main | |
import Data.Foldable (foldl') | |
import Data.IntMap.Strict (IntMap, (!)) | |
import Data.List (unfoldr) | |
import qualified Data.IntMap.Strict as IntMap | |
{- | |
resultFile=bench-$(date +%s).html |
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
#! /usr/bin/env nix-shell | |
#! nix-shell -i runghc -p "haskellPackages.ghcWithPackages (ps: [ps.conduit])" | |
import Conduit | |
trans :: Monad m => ConduitT Int Int m () | |
trans = do | |
takeC 3 .| mapC (+ 1) | |
takeC 3 .| mapC (* 2) | |
xs <- foldlC (\z x -> x : (take 2 z)) [] |
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
# create/update resources | |
kubectl --context=minikube apply -f ./postgres.yaml | |
# In order for the service to reach the statefulset, the following should | |
# be true: | |
# statefulset.spec.selector.matchLabels.app == service.spec.selector.app | |
# statefulset.spec.selector.matchLabels.role == service.spec.selector.role | |
# give the server some time to start up | |
# ... |
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
# install MySQL Server | |
nix-env --install --attr nixos.mysql57 | |
sudo su | |
groupadd mysql | |
useradd -M \ | |
--home-dir /var/lib/mysql \ | |
--no-user-group \ | |
--system \ | |
--gid mysql \ |
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 Data.Maybe | |
import qualified Data.Map as Map | |
type Cell = Map.Map String Int | |
cell :: [(String, Int)] -> Cell | |
cell = Map.fromList | |
isOn :: Cell -> Bool | |
isOn = (> 0) . Map.findWithDefault 0 "on" |
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
#!/usr/bin/env bash | |
PADDING='Padding' | |
main() { | |
local xterm_start=0 \ | |
xterm_width=8 \ | |
xterm_height=2 | |
local cube_start=$((xterm_start + xterm_width * xterm_height)) \ |
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
#include <linux/module.h> | |
#include <linux/serio.h> | |
#include <linux/vmalloc.h> | |
#include <linux/i8042.h> | |
// Simplified i8042 key filter for example purposes | |
struct key_data { | |
bool is_pressed; | |
unsigned long updated_at; |
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
setlocal iskeyword-=# | |
nnoremap <buffer> <silent> <C-]> :tag <C-R>=Vimcword()<CR><CR> | |
nnoremap <buffer> <silent> g<C-]> :tjump <C-R>=Vimcword()<CR><CR> | |
nnoremap <buffer> <silent> g] :tselect <C-R>=Vimcword()<CR><CR> | |
func! Vimcword() | |
let l:orig=&l:iskeyword | |
setlocal iskeyword+=# |
NewerOlder