Skip to content

Instantly share code, notes, and snippets.

View ronaldsuwandi's full-sized avatar
🙃

Ronald Suwandi ronaldsuwandi

🙃
View GitHub Profile
@ronaldsuwandi
ronaldsuwandi / .gitconfig
Last active April 21, 2021 23:13
My personal gitconfig
[user]
name = Ronald Suwandi
email = ronald@ronaldsuwandi.com
[core]
excludesfile = ~/.gitignore_global
editor = subl -n -w # sublime text
[diff]
tool = default-difftool
@ronaldsuwandi
ronaldsuwandi / config.fish
Last active July 30, 2021 07:54
My personal fish shell config for OS X. Supports git branch (fast git checks), virtualenv (if installed) and Kubernetes current context
function ls --description 'List contents of directory'
command ls -lFG $argv
end
function subl --description 'Launches sublime text in a new window'
command subl -n $argv
end
function code --description 'Launches visual code studio in a new window'
command code -n $argv
@ronaldsuwandi
ronaldsuwandi / tmux.conf
Last active January 24, 2024 02:58
Personal tmux.conf (updated for 3.2)
###########
# general #
###########
# Replace C-b prefix with Alt+Space (so it won't clash with vim)
unbind C-b
set-option -g prefix M-Space
set-window-option -g mode-keys vi
# set-option -g default-shell /usr/local/bin/fish

Source

OS X

Configuration ~/Library/Preferences/<PRODUCT><VERSION>

Caches ~/Library/Caches/<PRODUCT><VERSION>

@ronaldsuwandi
ronaldsuwandi / .bashrc
Created April 1, 2016 09:49
Prompt for bashrc
# because color + coffee is awesome
PS1=$'\e[39m\u@\h:\e[32m\w\e[39m \u2615 \uFE0F '
@ronaldsuwandi
ronaldsuwandi / exercise-equivalent-binary-trees.go
Last active June 8, 2017 02:40
Go Tour: Web Crawler (channel approach) + Equivalent Binary Trees
package main
import "fmt"
import "golang.org/x/tour/tree"
func WalkRecursive(t *tree.Tree, ch chan int) {
if t.Left != nil {
WalkRecursive(t.Left, ch)
}
ch <- t.Value
@ronaldsuwandi
ronaldsuwandi / settings
Last active April 11, 2021 03:54
IntelliJ IDEA JVM Options
-Xms2g
-Xmx2g
-XX:ReservedCodeCacheSize=1024m
-XX:+UseG1GC
-XX:+UseCompressedOops
-Dsun.io.useCanonCaches=false
@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
@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 / 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}"