Skip to content

Instantly share code, notes, and snippets.

View rdamus's full-sized avatar

rob d. rdamus

View GitHub Profile
@nicolaballotta
nicolaballotta / kubecontext.zsh
Last active March 26, 2025 22:57
Add Kubernetes context to your zsh prompt (for Agnoster theme, but can easily be adapted to different themes)
# INSTALLATION
# - Add the following function to your .oh-my-zsh/themes/agnoster.zsh-theme
# - Call prompt_kubecontext from build_prompt() as showed in the example below
#
#
# build_prompt() {
# prompt_kubecontext
# }
@vadviktor
vadviktor / etc.fstab
Last active February 3, 2019 09:08
Ubuntu guest VMware shared folders using open-vm-tools package and vmhgfs-fuse
.host:/vmshared /mnt/vmshared fuse.vmhgfs-fuse allow_other,uid=1000,gid=1000,auto_unmount,defaults 0 0
@bittner
bittner / 60-jetbrains.conf
Created September 25, 2015 07:57
Inotify configuration for IntelliJ IDEA (PhpStorm, PyCharm, RubyMine, WebStorm). Create this file with e.g. `sudo vim /etc/sysctl.d/60-jetbrains.conf`
# Set inotify watch limit high enough for IntelliJ IDEA (PhpStorm, PyCharm, RubyMine, WebStorm).
# Create this file as /etc/sysctl.d/60-jetbrains.conf (Debian, Ubuntu), and
# run `sudo service procps start` or reboot.
# Source: https://confluence.jetbrains.com/display/IDEADEV/Inotify+Watches+Limit
#
# More information resources:
# -$ man inotify # manpage
# -$ man sysctl.conf # manpage
# -$ cat /proc/sys/fs/inotify/max_user_watches # print current value in use
@kdabir
kdabir / dir_traverse.groovy
Last active December 6, 2022 08:12
A groovy directory traverse that excludes given dirs. Change the last closure to do something interesting instead of printing the dir name
import groovy.io.FileType
import groovy.io.FileVisitResult
final excludedDirs = ['.svn', '.git', '.hg', '.idea', 'node_modules', '.gradle', 'build']
int count = 0
new File(root).traverse(
type : FileType.DIRECTORIES,
preDir : { if (it.name in excludedDirs) return FileVisitResult.SKIP_SUBTREE }, // excludes children of excluded dirs
excludeNameFilter : { it in excludedDirs }, // excludes the excluded dirs as well