Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python3
import fdb
import json
from argparse import ArgumentParser
import logging
import signal
import sys
import tempfile
from prometheus_client import (
@meangrape
meangrape / chpwd_update_git_vars.sh
Created November 20, 2021 15:54 — forked from scelis/chpwd_update_git_vars.sh
Add git information to your ZSH prompt.
update_current_git_vars
@meangrape
meangrape / renameat2.c
Created August 5, 2021 13:29 — forked from eatnumber1/renameat2.c
Command-line tool to call renameat2(2)
#define _GNU_SOURCE
#include <stdlib.h>
#include <fcntl.h>
#include <stdio.h>
#include <getopt.h>
#include <stddef.h>
#include <stdbool.h>
#include <stdarg.h>
#include <errno.h>
#include <unistd.h>
@meangrape
meangrape / functions.sh
Created July 3, 2018 16:28 — forked from junegunn/functions.sh
Key bindings for git with fzf (https://junegunn.kr/2016/07/fzf-git/)
# GIT heart FZF
# -------------
is_in_git_repo() {
git rev-parse HEAD > /dev/null 2>&1
}
fzf-down() {
fzf --height 50% "$@" --border
}
@meangrape
meangrape / java.env
Created November 8, 2011 16:45 — forked from dln/java.env
Zookeeper RPM spec for CentOS 5.x, including python bindings
ZOO_LOG4J_PROP="INFO,ROLLINGFILE"
ZOO_LOG_DIR="/var/log/zookeeper/"
#!/usr/bin/env ruby
$existing_methods = []
def print_methods(library)
new_methods = [].methods.sort - $existing_methods
for method in new_methods
puts "Array##{method}"
end
puts "(total: #{new_methods.size} added by #{library})\n\n"