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/bash | |
# | |
# Usage: ping-scan.sh | |
# | |
# Notes: This script can only be executed on WSL2/Windows. | |
# You can specify $SUBNET variable. | |
SUBNET='192.168' | |
my_ip() { |
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
// SPDX-License-Identifier: CC0-1.0 | |
// | |
// zmk-create-skeleton.v | |
// | |
// Creates skeleton files for the ZMK template (https://github.com/zmkfirmware/unified-zmk-config-template) | |
// | |
// ./boards/shields/KBD_NAME/ | |
// Kconfig.shield | |
// Kconfig.defconfig | |
// KBD_NAME.overlay |
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
echo $PATH | tr ':' '\n' |
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
# somewhere like `~/.config/sway/config.d/default` | |
# | |
# add a following line to the end of sway config | |
bindsym $mod+k exec PATH/TO/sway-show-keybindings-fuzzel.sh |
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
#!/bin/zsh | |
s=$(rg '^ *bindsym +(.+)$' ~/.config/sway/config.d/default | sed -e 's/^ *bindsym *//' | sed 's/ \+/\t/' | sed 's/\+/ /g' | awk '{printf("%25s\t%s\n", $1, $2)}' FS='\t') | |
w=`expr "$COLUMNS" - 16` | |
s=$(echo ${s} | cut -c -${w}) | |
echo $s | less |
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
h() { | |
local tmp_file=/tmp/h | |
local cmd='' | |
if [ "$#" -eq 0 ]; then | |
cmd=$(echo $PATH | tr ':' '\n' | xargs -I {} find {} -maxdepth 1 -type f -executable 2>/dev/nul | |
l | xargs -n 1 basename | fzf); | |
elif [ "$#" -eq 1 ]; then | |
cmd=$1 | |
else |
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
$rg --no-heading bat43 # check | |
rat43.zmk.yml:2:id: bat43 | |
rat43.zmk.yml:5:url: https://kbd.dailycraft.jp/bat43/ | |
Kconfig.shield:5: def_bool $(shields_list_contains,bat43) | |
$sed -i -e 's/bat43/rat43/' * # replace bat43 --> rat43 | |
$rg --no-heading bat43 # confirm | |
$rg --no-heading rat43 # confirm |
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
$ls -1 | |
bat43.keymap | |
bat43.overlay | |
bat43.zmk.yml | |
Kconfig.defconfig | |
Kconfig.shield | |
$rename -n -v bat43 rat43 bat43* # dry run | |
`bat43.keymap' -> `rat43.keymap' | |
`bat43.overlay' -> `rat43.overlay' |
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
root@feb003495f7a:/workspaces/zmk-modules/zmk-modules/1key-zmk-shield# west build -s /workspaces/zmk/app -p -b seeeduino_xiao -- -DSHIELD=1key -DZMK_CONFIG=$PWD/config | |
-- west build: generating a build system | |
Loading Zephyr default modules (Zephyr base). | |
-- Application: /workspaces/zmk/app | |
-- CMake version: 3.30.0 | |
-- Found Python3: /usr/bin/python3 (found suitable version "3.12.3", minimum required is "3.8") found components: Interpreter | |
-- Cache files will be written to: /root/.cache/zephyr | |
-- Zephyr version: 3.5.0 (/workspaces/zmk/zephyr) | |
-- Found west (found suitable version "1.2.0", minimum required is "0.14.0") | |
-- ZMK Config directory: /workspaces/zmk-modules/zmk-modules/1key-zmk-shield/config |
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
##emacs-29.3 Maintainer: Pedro A. López-Valencia <https://aur.archlinux.org/users/toropisco> | |
################################################################################ | |
# CAVEAT LECTOR: This PKGBUILD is highly opinionated. I give you | |
# enough rope to hang yourself, but by default it | |
# only enables the features I use. | |
# | |
# TLDR: yaourt users, cry me a river. | |
# | |
# Everyone else: do not update blindly this PKGBUILD. At least |
NewerOlder