Skip to content

Instantly share code, notes, and snippets.

View elhenro's full-sized avatar

Henry Schober elhenro

View GitHub Profile
@elhenro
elhenro / gist:a6cc9c24d1379255530852e54be32c85
Created October 20, 2023 13:36
Put this in ~/.zshrc in order to update ~/.zsh_history in realtime from all terminal sessions
setopt INC_APPEND_HISTORY
setopt SHARE_HISTORY
#!/bin/bash
OUTPUTFILE="data.txt"
find . -type f -not -path "./node_modules/*" | while read -r file
do
numlines=$(wc -l < "$file")
if [[ $numlines -lt 1000 ]]; then
fileext="${file##*.}"
echo -e "\n$file\n" >> $OUTPUTFILE
echo -e "\n\`\`\`$fileext\n" >> $OUTPUTFILE
cat "$file" >> $OUTPUTFILE
@elhenro
elhenro / .zshrc
Last active January 24, 2023 21:56
zsh ctrl+x shortcut to select scripts to paste into command line (without executing!)
# .. put into ~/.zshrc
# to extend directories, symlinks can be created in ~/scripts/.. (`ln -s`)
fzf-paste-input() {
location=$(pwd)
cd ~/scripts
local output
# basic
#output=~/scripts/$(fzf</dev/tty) && LBUFFER+=${(q-)output}
@elhenro
elhenro / .skhdrc
Created June 15, 2022 20:20
simple i3 like skhdrc for yabai
# switch workspaces
alt - 1 : yabai -m space --focus 1
alt - 2 : yabai -m space --focus 2
alt - 3 : yabai -m space --focus 3
alt - 4 : yabai -m space --focus 4
alt - 5 : yabai -m space --focus 5
# toggle window float to ignore tiling
alt - f : yabai -m window --toggle float
@elhenro
elhenro / .yabairc
Created June 15, 2022 20:19
simple i3 like yabairc
#!/usr/bin/env sh
yabai -m config mouse_follows_focus on
yabai -m config focus_follows_mouse autofocus
yabai -m config window_origin_display default
yabai -m config window_placement second_child
yabai -m config window_topmost off
yabai -m config window_shadow on
yabai -m config window_opacity off
#yabai -m config window_opacity_duration 0.0
yabai -m config active_window_opacity 1.0
@elhenro
elhenro / cloudSettings
Last active November 25, 2020 12:04 — forked from jdelibas/cloudSettings
Visual Studio Code Settings Sync Gist
{"lastUpload":"2020-11-25T11:49:08.241Z","extensionVersion":"v3.4.3"}
how to fix sound archlinux asus c302ca
1. `dsp_fw_release.bin` has to point to `/lib/firmware/intel/dsp_fw_release_v969.bin`
2. in `/usr/share/alsa/ucm/sklnau8825max`:
## `HiFi.conf`
```
@elhenro
elhenro / termite config
Created June 25, 2019 08:26
colors from spacecamp vim colorscheme
[colors]
cursor = #F66100
cursor_foreground = #CF73E6
highlight = #F66100
color0 = #91AADF
color1 = #F66100
color2 = #F0D50C
color3 = #DEDEDE
color4 = #F66100
color5 = #91AADF
@elhenro
elhenro / termite config
Created June 25, 2019 08:26
colors from spacecamp vim colorscheme
[colors]
cursor = #F66100
cursor_foreground = #CF73E6
highlight = #F66100
color0 = #91AADF
color1 = #F66100
color2 = #F0D50C
color3 = #DEDEDE
color4 = #F66100
color5 = #91AADF
shadow = true;
no-dock-shadow = true;
no-dnd-shadow = true;
clear-shadow = true
shadow-radius = 7;
shadow-offset-x = -7;
shadow-offset-y = -7;
shadow-opacity = 0.7;
# shadow-red = 0.0;
# shadow-green = 0.0;