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 <stdio.h> | |
| int fun0(void) { return 5; } | |
| int fun1(int x) { return x * 10; } | |
| // inline int fun1_inline(int x) { return x * 100; } // => undefined reference | |
| extern inline int fun1_inline_extern(int x) { return x * 100; } | |
| static inline int fun1_inline_static(int x) { return x * 1000; } | |
| #define OVERRIDE 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
| #include <stdio.h> | |
| int fun0(void) { return 5; } | |
| int fun1(int x) { return x * 2; } | |
| #define OVERRIDE 1 | |
| #if OVERRIDE == 1 | |
| #define fun0() (9) | |
| #define fun1(x) (99) |
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 python3 | |
| # | |
| # Example usage: | |
| # dmesg -w | myfilter.py -x foo bar baz | |
| # | |
| import sys | |
| import re | |
| import argparse |
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
| #Requires AutoHotkey v2.0 | |
| #SingleInstance Force | |
| soundvolPath := "D:\pgm\soundvolumeview-x64\SoundVolumeView.exe" | |
| matchKey := "アークナイツ" ; used to find the session | |
| muteTarget := "" ; will be set from CSV field[1] (Name column) | |
| ^!m::toggleMute() | |
| toggleMute() { |
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
| $ cd ~/Downloads | |
| $ ls foo # `foo` does *not* exist | |
| ls: cannot access 'foo': No such file or directory | |
| $ waitfor 1 ls foo | |
| .... | |
| #### begin: another shell | |
| $ touch ~/Downloads/foo | |
| #### end: another shell |
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/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 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
| // 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 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
| echo $PATH | tr ':' '\n' |
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
| # 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 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
| #!/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 |