Skip to content

Instantly share code, notes, and snippets.

title: personal wishlist
description: see https://gist.github.com/barn/84ab929b5fad96834acbd187cbd05f12
//wastelander shotgun
//notes: PvE Roll??
dimwishlist:item=1679868061&perks=1047830412,791862061,536173722,78
//retrofit volatile taget lock // https://www.youtube.com/watch?v=Vx0TPO3NLOE
dimwishlist:item=3103325054&perks=1482024992,2420895100,848860060,2939589096,192157151
@barn
barn / muttprint.pl
Created August 8, 2022 16:40
messy hacked version of muttprint
#!/usr/bin/env perl
#
# Hinweis: Tabulatorbreite: 4 Zeichen
# Notice: tab width: 4 characters
#
########################################################################
# #
# Muttprint - pretty printing of mails with Mutt #
# Copyright (c) 2000-04, Bernhard Walle <bernhard.walle@gmx.de> #
# Copyright (c) 2005, Lukas Ruf <lukas.ruf@lpr.ch> #
@barn
barn / copy_from_docker_image.sh
Created January 19, 2022 16:52
zsh function to copy files out of a container image.
#!/bin/zsh
#
# Supports <image>:<path>, supports sha256/tags, path supports wildards, if a second arg is a path, it will output there, creating paths if needed
# $ copy_from_docker_image ruby:2.7.4:/etc/hosts ./
copy_from_docker_image() {
if [ -z "$ZSH_VERSION" ]; then
echo "sorry I need to use zsh"
exit 1
fi
@barn
barn / npm.sh
Last active July 7, 2019 16:49
#! /bin/zsh
NPM="$(which -a npm 2>/dev/null | grep -m 1 /)"
if [ -n "$NPM" ]
then
npm() {
local rc
"$NPM" $@
rc=$?
@barn
barn / .gitconfig
Created April 18, 2018 18:01
Add this to your git config (found via some stackoverflow, and beaten till it worked)
[alias]
recent = "!r() { \
git for-each-ref --color=always --sort=-committerdate refs/heads --format='%(HEAD)%(color:yellow)%(refname:short)|%(color:bold green)%(committerdate:relative)|%(color:blue)%(subject)|%(color:magenta)%(authorname)%(color:reset)' \
| column -ts'|' \
| cut -c -$(tput cols) \
;}; r"
@barn
barn / gist:e11440955e873dad4b71f627f357c293
Created April 17, 2018 22:45
Use list of branches by age
~/.gitconfig
[alias]
recent = "!r() { \
git for-each-ref --color=always --sort=-committerdate refs/heads --format='%(HEAD)%(color:yellow)%(refname:short)|%(color:bold green)%(committerdate:relative)|%(color:blue)%(subject)|%(color:magenta)%(authorname)%(color:reset)' \
| column -ts'|' \
| cut -c -$(tput cols) \
;}; r"
@barn
barn / puppet_prov_pkg_pip.diff
Created April 17, 2018 20:21
Diff to fix puppet 3.x.x talking to Pypi after they changed their infrastructure (to do the right thing) on 2018-04-17
diff --git i/lib/puppet/provider/package/pip.rb w/lib/puppet/provider/package/pip.rb
index 8e889a0b1..0204b17d0 100644
--- i/lib/puppet/provider/package/pip.rb
+++ w/lib/puppet/provider/package/pip.rb
@@ -68,6 +68,9 @@ Puppet::Type.type(:package).provide :pip,
client = XMLRPC::Client.new2("http://pypi.python.org/pypi", proxy)
client.http_header_extra = {"Content-Type" => "text/xml"}
+ # also add an accept header, as the pypi infra changed and now they
+ # will gzip the response, which xmlrpc client will not handle.
installing default objspace libraries
compiling ossl_asn1.c
In file included from ossl_asn1.c:11:
In file included from ./ossl.h:213:
./openssl_missing.h:71:6: error: conflicting types for 'HMAC_CTX_copy'
void HMAC_CTX_copy(HMAC_CTX *out, HMAC_CTX *in);
^
/usr/local/include/openssl/hmac.h:101:5: note: previous declaration is here
int HMAC_CTX_copy(HMAC_CTX *dctx, HMAC_CTX *sctx);
^
[:~]% ls -l sb3*
-rw-r--r--@ 1 bhughes staff 23225244 27 Jul 21:29 sb3.mp3
-rw-r--r-- 1 bhughes staff 22159194 27 Jul 21:29 sb3_gz.mp3.gz
-rw-r--r-- 1 bhughes staff 21887200 27 Jul 21:29 sb3_xz.mp3.xz
@barn
barn / mutt-hash-fingerprints-patch.diff
Created July 14, 2015 22:00
Patch for mutt 1.5.23 to show more hash fingerprints for unknown certificates.
--- a/mutt_ssl.c Sun Jul 05 13:38:39 2015 -0700
+++ b/mutt_ssl.c Tue Jul 14 19:00:46 2015 +0100
@@ -551,7 +551,7 @@
return ret;
}
-static void x509_fingerprint (char *s, int l, X509 * cert)
+static void x509_fingerprint_md5 (char *s, int l, X509 * cert)
{
unsigned char md[EVP_MAX_MD_SIZE];