This file contains hidden or 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: https://github.com/BurntSushi/ripgrep#installation | |
# Use ripgrep instead of grep | |
set-option global grepcmd 'rg -Hn --no-heading' |
This file contains hidden or 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
# https://waylonwalker.com/tmux-fzf-session-jump/ | |
bind-key -n M-z display-popup -E "\ | |
tmux list-sessions -F '#{?session_attached,,#{session_name}}' |\ | |
sed '/^$/d' |\ | |
fzf --reverse --header jump-to-session --preview 'tmux capture-pane -pt {}' |\ | |
xargs tmux switch-client -t" |
This file contains hidden or 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
for s in \$(tmux list-sessions | awk '{print \$1}' | rg ':' -r '' | fzy); do tmux kill-session -t \$s; done; |
This file contains hidden or 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
# this is also documented on the weechat pluging repository | |
# except for the first step which took me a minute to figure out | |
/set script.scripts.download_enabled on | |
/script install slack.py | |
/slack register |
This file contains hidden or 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
emacsclient --alternate-editor='' -nw |
This file contains hidden or 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
❯ npm i | |
npm WARN deprecated [email protected]: Use your platform's native performance.now() and performance.timeOrigin. | |
npm WARN deprecated [email protected]: Please use @jridgewell/sourcemap-codec instead | |
npm WARN deprecated [email protected]: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility | |
npm WARN deprecated [email protected]: This SVGO version is no longer supported. Upgrade to v2.x.x. | |
npm WARN deprecated [email protected]: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-terser | |
npm WARN deprecated @types/[email protected]: This is a stub types definition. testing-library__react provides its own type definitions, so you do not need this installed. | |
added 1725 packages, and audited 1726 packages in 20s |
This file contains hidden or 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 | |
# Locking from: https://gist.github.com/jpclipffel/0b8f470be029fc9e3f07 | |
# Run two bash commands in sequence using flock to prevent | |
# from running multiple instances in paralell | |
# ./sequenced.sh -g echo 'Hello' > test.txt -t cat test.txt -n lock_name | |
while getopts 1:2:n: flag; do | |
case "${flag}" in | |
1) FIRST_CMD=${OPTARG} ;; |
This file contains hidden or 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 "matching_brackets.h" | |
#include <string.h> | |
struct Stack { | |
int top; | |
char data[20]; | |
}; | |
void push(struct Stack *s, char elem) { | |
s->top++; |
This file contains hidden or 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
use "collections" | |
primitive Day01 | |
fun val test_input(): String => "199\n200\n208\n210\n200\n207\n240\n269\n260\n263\n" | |
fun solve_part1(input: String): USize => | |
let depths = _parse_entries(input) | |
var last_depth: USize = 0 | |
// hack because the first will always be an increase | |
var incs: USize = -1 |
This file contains hidden or 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 | |
## PARTITION DISKS | |
################## | |
# zap-all and clear partition table | |
sgdisk -Z /dev/sda && sgdisk -o /dev/sda | |
# create bios_grub partition | |
sgdisk -n 1::+8M -t 1:ef02 /dev/sda | |
# create boot partition | |
sgdisk -n 2::+512M -t 2:8300 /dev/sda |
NewerOlder