https://gist.github.com/a-rodin/fef3f543412d6e1ec5b6cf55bf197d7b
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# this script will remove any stale kernel- and kernel-headers- packages | |
# it will keep the current (uname -r) and latest kernel package and its headers | |
SUDO=sudo | |
while [ -n "$1" ] ; do | |
case "$1" in | |
-h) echo "${0##*/} [ -h ] [ -n ]" ; exit 0 ;; | |
-n) SUDO=echo ;; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# https://superuser.com/questions/413349/limiting-use-of-ram-in-chrome | |
import sys, os, psutil | |
limit = 200 #default 200MB | |
if len(sys.argv) == 2: | |
try: | |
limit = int(sys.argv[1]) | |
except: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cat ~/.gdbinit | |
# GEF | |
# https://gef.readthedocs.io/en/master/ | |
# | |
# https://github.com/hugsy/gef | |
# Voltron | |
# https://github.com/snare/voltron | |
# | |
# git clone https://github.com/snare/voltron |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# watch cgroup 'browsers' memory activity | |
# | |
# best served with ... | |
# | |
# https://gist.github.com/jakewarren/477ecd1149abe908cbd5cf7a7c9abaa3 | |
self=$0 | |
SUDO= |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/zsh | |
#autoload -U | |
#vim: set ft=zsh | |
local use_exec=false | |
local base=${0##*/} | |
local sname=${base#tmux} | |
function err() { print -P >&2 - "%B%F{red}$@" ; } |
I hereby claim:
- I am bartman on github.
- I am bartman (https://keybase.io/bartman) on keybase.
- I have a public key ASBIrHW2ndQDGlTFhnp9hFSCrN8t61PiRTZ6oBU2S1MJ3wo
To claim this, I am signing this object:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pulled from | |
https://github.com/systemd/systemd | |
#define strjoina(a, ...) \ | |
({ \ | |
const char *_appendees_[] = { a, __VA_ARGS__ }; \ | |
char *_d_, *_p_; \ | |
size_t _len_ = 0; \ | |
unsigned _i_; \ | |
for (_i_ = 0; _i_ < ELEMENTSOF(_appendees_) && _appendees_[_i_]; _i_++) \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*~ | |
sceptre |