Skip to content

Instantly share code, notes, and snippets.

@draeath
draeath / github-cloner.sh
Last active November 13, 2020 20:53
Bash script to pull github organizations. Note '-C' for git requires a modern git version.
#!/bin/bash
# you PROBABLY want to use an ssh-key for this, or you'll
# be typing your password over and over and over...
# you MUST set ORG_NAME and ACCESS_TOKEN below!
# if you want to grab private repositories, the
# token must have the full "repos" scope selected
#
# ... note no other scopes are required, and you
@draeath
draeath / diskusage.sh
Last active August 23, 2022 23:59
sorted disk usage in human readable units (bash)
#!/bin/bash
echo Results for: $(hostname):$(pwd) > ~/du_sorted.txt
sudo nice du -xk --exclude=.snapshot | nice sort -nr | nice \
awk 'BEGIN {
split("KB,MB,GB,TB", Units, ",");
}
{
u = 1;
while ($1 >= 1024) {
@draeath
draeath / gpg-agent.conf
Last active May 24, 2017 22:19
environment: homedir/.gnupg
pinentry-program /usr/bin/pinentry-gtk-2
default-cache-ttl 600
max-cache-ttl 7200
#enable-putty-support
enable-ssh-support
@draeath
draeath / .bash_profile
Last active March 2, 2022 20:16
environment: homedir
# keep contents in sync with .profile (except the .bashrc call)
export CONDA_DIR="/opt/${USER}/mamba"
export PATH="${CONDA_DIR}/bin:$PATH"
export CONFIGURE_OPTS="--enable-optimizations"
export PYTHON_CFLAGS="-pipe -m64 -march=generic64 -mtune=native"
export PYTHON_MAKE_OPTS="-j$(nproc)"
export PYTHON_MAKE_INSTALL_OPTS="$PYTHON_MAKE_OPTS"
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"