Skip to content

Instantly share code, notes, and snippets.

View ronaldsuwandi's full-sized avatar
🙃

Ronald Suwandi ronaldsuwandi

🙃
View GitHub Profile
@ronaldsuwandi
ronaldsuwandi / .aerospace.toml
Created August 17, 2024 06:47
Aerospace config (mix between i3 and glazewm)
after-login-command = []
after-startup-command = [
# JankyBorders has a built-in detection of already running process,
# so it won't be run twice on AeroSpace restart
'exec-and-forget borders active_color=0xffff4641‰ width=5.0'
]
start-at-login = true
enable-normalization-flatten-containers = true
enable-normalization-opposite-orientation-for-nested-containers = true
@ronaldsuwandi
ronaldsuwandi / config.yaml
Last active September 3, 2024 02:44
GlazeWM config with slight modification (disabled resize mode, changed full screen shortcut with zebar support). Also Zebar config that shows title
general:
# Commands to run when the WM has started (e.g. to run a script or launch
# another application). Here we are running a batch script to start Zebar.
startup_commands: ['shell-exec %userprofile%/.glzr/zebar/start.bat']
# Whether to automatically focus windows underneath the cursor.
focus_follows_cursor: false
# Whether to switch back and forth between the previously focused
# workspace when focusing the current workspace.
@ronaldsuwandi
ronaldsuwandi / .zshrc
Last active October 27, 2023 09:58
zshrc custom command (after installing oh my zsh and powershell10k)
plugins=(git zsh-autosuggestions zsh-syntax-highlighting ssh-agent)
alias ls="ls -lFh --color"
function command_not_found_handler() {
echo "zsh: command not found: $1\n"
figlet -froman lol - $1
}
@ronaldsuwandi
ronaldsuwandi / obsidian-minimal-theme-snippet.css
Last active June 27, 2023 06:26
Minor css snippet tweaks for Obsidian Minimal theme (dim non-focused pane, highlight sync icon). Works for Obsidian 1.2.8 (requires Electron v21 - Chrome 105+)
/* better contrast for status-bar */
.status-bar{
color: var(--tx2);
}
/* better contrast for status bar (sync button) */
:is(.theme-light, .theme-dark) :is(.sync-status-icon.mod-success, .sync-status-icon.mod-working) {
color: var(--tx2);
}
@ronaldsuwandi
ronaldsuwandi / .gitignore_global
Created April 21, 2021 23:22
.gitignore file
# Created by https://www.toptal.com/developers/gitignore/api/go,python,node,java,intellij+all,sublimetext,visualstudiocode,xcode,maven,gradle
# Edit at https://www.toptal.com/developers/gitignore?templates=go,python,node,java,intellij+all,sublimetext,visualstudiocode,xcode,maven,gradle
### Go ###
# Binaries for programs and plugins
*.exe
*.exe~
*.dll
*.so
@ronaldsuwandi
ronaldsuwandi / .vimrc
Last active September 28, 2022 03:31
.vimrc file to display active window more obvious, enabled syntax highlighting and autoindent
" Reference: https://github.com/amix/vimrc/blob/master/vimrcs/basic.vim
" Enable filetype plugins
filetype plugin on
filetype indent on
" Better status when using window
" Reference: https://superuser.com/a/807010=
highlight StatusLineNC cterm=bold ctermfg=white ctermbg=darkgray
@ronaldsuwandi
ronaldsuwandi / docker-compose.yml
Last active June 24, 2024 23:04
Docker Compose for Jupyter Lab/Notebook (no token/password required)
version: "3.9"
services:
jupyter:
image: quay.io/jupyter/scipy-notebook
ports:
- "8888:8888"
volumes:
- ./notebooks:/home/jovyan/
environment:
@ronaldsuwandi
ronaldsuwandi / cbz.sh
Last active September 30, 2020 06:52
Create .cbz file from directory
#!/bin/bash
if [ -z "${prefix}" ]; then
echo "warn: prefix is not set"
fi
for f in *; do
if [ -d "${f}" ]; then
echo "Zipping ${f} to ${prefix}${f}.cbz"
zip -r "${prefix}${f}.cbz" "${f}"
@ronaldsuwandi
ronaldsuwandi / References
Last active June 8, 2020 03:19
Various Postgres Stats SQL Queries
https://www.datadoghq.com/blog/postgresql-monitoring/
https://www.datadoghq.com/blog/postgresql-monitoring-tools/
@ronaldsuwandi
ronaldsuwandi / .bash_prompt
Last active November 12, 2018 07:44
Personal bash prompt
alias ls='ls -FGH'
alias ll='ls -l'
export JAVA_HOME=/Libary/Java/Home
kubecontext()
{
if [[ -e ~/.kube/config && $(type -P kubectl 2>/dev/null) ]]; then
echo -n " [$(kubectl config current-context)]"
else