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
| set ideajoin | |
| set ignorecase | |
| set smartcase | |
| let mapleader = "," | |
| let localmapleader = "," | |
| map <leader>cr <Action>(RenameElement) | |
| map <leader>ca <Action>(ShowIntentionActions) | |
| map <leader>/ <Action>(CommentByLineComment) |
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
| # Internet access | |
| ################# | |
| iwctl station list # list devices | |
| NET_DEVICE="MyDevice" | |
| iwctl station $NET_DEVICE scan | |
| iwctl station $NET_DEVICE get-networks # list networks | |
| NET_NAME="MyNetwork" | |
| NET_PASS="MyPassword" | |
| iwctl --passphrase $NET_PASS station $NET_DEVICE connect $NET_NAME |
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 | |
| if [ "$#" -ne 2 ]; then | |
| echo "Incorrect number of arguments." | |
| exit 1 | |
| fi | |
| BRANCH=$1 | |
| URL="https://github.com/SamuelDavis/templates/archive/refs/heads/$BRANCH.zip" | |
| TEMP_FILE="/tmp/templates-$BRANCH.zip" |
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
| set title | |
| " Styling | |
| syntax on | |
| colorscheme slate | |
| " Search | |
| set incsearch " incrementally highlight search while typing | |
| " Sidebar |
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
| import { | |
| addComponent, | |
| addEntity, | |
| createWorld, | |
| defineComponent, | |
| defineQuery, | |
| type ComponentType, | |
| type IWorld, | |
| Types, | |
| type ISchema, |
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
| hs.hotkey.bind({"cmd", "alt", "ctrl"}, "Left", function() | |
| local win = hs.window.focusedWindow() | |
| local f = win:frame() | |
| local screen = win:screen() | |
| local max = screen:frame() | |
| f.x = max.x | |
| f.y = max.y | |
| f.w = max.w / 2 | |
| f.h = max.h |
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
| # | |
| # ~/.bashrc | |
| # | |
| # If not running interactively, don't do anything | |
| [[ $- != *i* ]] && return | |
| export BROWSER="brave-bin" | |
| export _JAVA_AWT_WM_NONREPARENTING=1 # dwm support for phpstorm | |
| export PATH="$PATH:$HOME/code/scripts" |
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
| (function () { | |
| const timeout = 5000; | |
| const start = performance.now(); | |
| const interval = setInterval(() => { | |
| const popup = document.querySelector('[data-testid="sheetDialog"] svg'); | |
| console.log(popup); | |
| if (!popup || performance.now() - start > timeout) | |
| return clearInterval(interval); | |
| if (popup) popup.parentElement.click(); | |
| }, 100); |
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 sh | |
| NAME='repo' | |
| # abort on errors | |
| set -e | |
| # build | |
| npm run build | |
| # navigate into the build output directory |
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
| let data = Array.from(document.querySelectorAll(".commands-container h2")).map( | |
| (el) => { | |
| return { | |
| heading: el.textContent, | |
| items: Array.from(el.nextElementSibling.children).map((el) => { | |
| const [answers, ...description] = el.textContent | |
| .trim() | |
| .split(/\s+-\s+/); | |
| return { | |
| description: description.join(" - "), |