Skip to content

Instantly share code, notes, and snippets.

View irizwaririz's full-sized avatar

John Carlo Roberto irizwaririz

View GitHub Profile
@irizwaririz
irizwaririz / .bashrc
Last active March 28, 2022 20:05
.bashrc setup for: conda, ssh-agent, Xserver, fzf
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/home/jcroberto/miniconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "/home/jcroberto/miniconda3/etc/profile.d/conda.sh" ]; then
. "/home/jcroberto/miniconda3/etc/profile.d/conda.sh"
else
export PATH="/home/jcroberto/miniconda3/bin:$PATH"
@irizwaririz
irizwaririz / instantiate_wsl_simple_terminal.vbs
Last active February 12, 2024 16:44
VBScript to instantiate WSL with simple terminal (st) as the terminal emulator (assuming there is an Xserver). Taken from: https://www.reddit.com/r/bashonubuntuonwindows/comments/64rtcl/comment/dg55c6s/?utm_source=share&utm_medium=web2x&context=3
Set WshShell = CreateObject("WScript.Shell")
WshShell.Run "C:\Windows\System32\Bash.exe ~ -ic st", 0
Set WshShell = Nothing
@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
@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 / 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 / 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 / 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 / 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 / urchin_parts_bom.csv
Last active December 21, 2024 12:51
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