Skip to content

Instantly share code, notes, and snippets.

View hannesbe's full-sized avatar
🏠
Working from home

Hannes Van de Vel hannesbe

🏠
Working from home
View GitHub Profile
@zamber
zamber / gen-menu.py
Last active May 21, 2020 15:57
A simple and dirty menu generator for MkDocs. Human sorting, titlecase and automatic numeration.
#!/usr/bin/python
# https://gist.github.com/zamber/af5086cb9c097be5c002
import os
import re
from titlecase import titlecase # pip install titlecase
# Config
root = 'src'
os.chdir(root)
@NQNStudios
NQNStudios / install-gist-scripts
Last active July 21, 2019 15:59
Manages executable scripts stored in Gists for use on Unix systems.
#!/bin/bash
# First argument: the ID of the Github Gist to clone from
GIST_ID=${1}
# Clone the gist in our bin directory
cd ~/bin
git clone [email protected]:/${GIST_ID}.git
# symlink all scripts for global execution
@m14t
m14t / fix_github_https_repo.sh
Created July 5, 2012 21:57
Convert HTTPS github clones to use SSH
#/bin/bash
#-- Script to automate https://help.github.com/articles/why-is-git-always-asking-for-my-password
REPO_URL=`git remote -v | grep -m1 '^origin' | sed -Ene's#.*(https://[^[:space:]]*).*#\1#p'`
if [ -z "$REPO_URL" ]; then
echo "-- ERROR: Could not identify Repo url."
echo " It is possible this repo is already using SSH instead of HTTPS."
exit
fi
@samuel
samuel / check_redis.py
Last active October 19, 2019 11:16
Redis health and memory check for Nagios
#!/usr/bin/python
#
# LICENSE: MIT
#
# Copyright (C) 2014 Samuel Stauffer
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation