Skip to content

Instantly share code, notes, and snippets.

View irizwaririz's full-sized avatar

John Carlo Roberto irizwaririz

View GitHub Profile
Go to C:\Program Files\Docker\Docker\resources\bin and open docker as admin
For the WSL1 part, replace with this:
```
# WSL 1
"$binary.exe" "$@"
```
@irizwaririz
irizwaririz / text_editor_anywhere_debug.txt
Last active August 24, 2023 07:48
Debugging how to make Text Editor Anywhere work with WSL's vim inside of simple terminal
C:\Windows\System32\cmd.exe
/k C:\Windows\sysnative\wsl.exe -e bash -lic "vim %1"
C:/Windows/sysnative/wsl.exe -e bash -lic "vim $(echo C:\Users\admin\Downloads\TEAPortable\TextEditorAnywhere\Temp\TextEditorAnywhere_14_11_100.txt)"
C:\Users\admin\Downloads\TEAPortable\TextEditorAnywhere\Temp\TextEditorAnywhere_14_11_100.txt
/mnt/c/Users/admin/Downloads/TEAPortable/TextEditorAnywhere/Temp/TextEditorAnywhere_14_11_100.txt
@irizwaririz
irizwaririz / urchin_parts_bom.csv
Last active February 19, 2023 07:22
Bare PCB Urchin Keyboard Parts List
Amount Part Part Number (if any) Notes Estimated Price (w/o shipping) Where to get/buy
1 pc Urchin PCB set Build guide: https://youtu.be/CHSh1-dJq24 https://github.com/duckyb/urchin
34 pcs Kailh Choc v1 hot swap sockets https://www.aliexpress.com/item/33023283633.html OR https://keebd.com/products/kailh-hot-swappable-low-profile-1350-pcb-socket-pack-of-10
34 pcs Kailh Choc v1 switches PG1350 https://nextkeyboard.club/product/choc-v1-switches-pack-of-5 OR https://shop.beekeeb.com/product/kailh-low-profile-choc-v1-key-switches-pg1350-chocolate-10-pcs OR https://www.aliexpress.com/item/4000419542482.html
34 pcs Choc v1 keycaps ✅ 1u size. To understand what "1u" means, refer to this: https://www.dwarf-factory.com/keycap-length https://nextkeyboard.club/product-category/keycaps/choc-keycaps
34 pcs SMD diodes 1N4148w SOD-123 package https://nextkeyboard.club/product/switch-diode-1n4148w-sod-123-smd
2 pcs nice!nano microcontroller boards ✅ https://nextkeyboard.club/product/nicenano OR https://shop.b
@irizwaririz
irizwaririz / Battery Notification.vbs
Created January 16, 2023 14:32
Battery Notification script
set oLocator = CreateObject("WbemScripting.SWbemLocator")
set oServices = oLocator.ConnectServer(".","root\wmi")
set oResults = oServices.ExecQuery("select * from batteryfullchargedcapacity")
for each oResult in oResults
iFull = oResult.FullChargedCapacity
next
while (1)
set oResults = oServices.ExecQuery("select * from batterystatus")
for each oResult in oResults
@irizwaririz
irizwaririz / ToggleGStatus
Last active June 3, 2022 09:31
Toggle the vim-fugitive git status window
" Easily open/close (toggle) the git status window.
nnoremap <leader>gs :call ToggleGStatus()<CR>
function! ToggleGStatus()
if buflisted(bufname('.git/index'))
bd .git/index
else
G
endif
endfunction
@irizwaririz
irizwaririz / ExecuteMacroOverVisualRange.md
Created March 30, 2022 18:38
Execute macro over visual range
xnoremap @ :<C-u>call ExecuteMacroOverVisualRange()<CR>

function! ExecuteMacroOverVisualRange()
  echo "@".getcmdline()
  execute ":'<,'>normal @".nr2char(getchar())
endfunction
@irizwaririz
irizwaririz / backup.crontab
Created March 30, 2022 17:15 — forked from rampion/backup.crontab
better vim backup strategy
# clean up any backups not used in the past 7 days out of the ~/.backup directory
@daily find ~/.backup -type f -name '*;*' -not \( -atime 0 -or -atime 1 -or -atime 2 -or -atime 3 -or -atime 4 -or -atime 5 -or -atime 6 \) -delete
@irizwaririz
irizwaririz / ubuntu_packages.md
Last active April 2, 2022 04:42
Debian/Ubuntu packages
  • curl -> data transfer (download, http request, etc)
  • git -> source control
  • stow -> dotfiles management
  • ripgrep -> default fzf command for better fuzzy finding
  • fzf -> improved shell workflow (autocompletion and command history)
@irizwaririz
irizwaririz / instantiate_xserver.bat
Created March 28, 2022 14:02
Batch script to instantiate Xserver
@echo off
start "" "C:\Program Files\VcXsrv\vcxsrv.exe" :0 -multiwindow -ac