Skip to content

Instantly share code, notes, and snippets.

View yawn's full-sized avatar
😷
3密

Joern Barthel yawn

😷
3密
  • Berlin
View GitHub Profile
@yawn
yawn / encrypt.sh
Last active May 10, 2022 11:32
GPG encrypt to all recipients in security.txt
#!/bin/bash
set -euo pipefail
keys=$(sed -n 's/^Encryption: //p' security.txt)
declare -a receivers
for key in $keys
do
# fetch key manually (we can't using --auto-key-locate clear,local,wkd --locate-key since the recipients might be different from the security email address)
t=$(mktemp)

Keybase proof

I hereby claim:

  • I am yawn on github.
  • I am yawn (https://keybase.io/yawn) on keybase.
  • I have a public key whose fingerprint is DC74 F59E D042 1ACA BBEF 000F DC6F F723 A19F 4686

To claim this, I am signing this object:

@yawn
yawn / s3policy-actions.txt
Last active January 4, 2016 08:19
List of all S3 bucket policy actions, taken from the S3 developer documentation 2006-03-01
Actions Related to Objects
"s3:GetObject",
"s3:GetObjectVersion",
"s3:PutObject",
"s3:GetObjectAcl",
"s3:GetObjectVersionAcl",
"s3:PutObjectAcl",
"s3:PutObjectVersionAcl",
"s3:DeleteObject",
VARNISH_VERSION=3.0.3
VMOD_REPOSITORY=https://github.com/nand2/libvmod-throttle.git
VMOD_NAME=libvmod-throttle
VMOD_VERSION='0.1'
VMOD_LICENSE='Simplified BSD License'
VMOD_VENDOR='Nicolas Deschildre'
VMOD_DESCRIPTION='Rate limiting in Varnish, on different time windows and keys'
sudo yum install -y pcre-devel python-docutils
VARNISH_VERSION=3.0.3
VMOD_REPOSITORY=https://github.com/vimeo/libvmod-boltsort.git
VMOD_NAME=libvmod-boltsort
VMOD_VERSION='1.0.0'
VMOD_LICENSE='Apache License 2.0'
VMOD_VENDOR='Vimeo, LLC'
VMOD_DESCRIPTION='Sort query strings in Varnish'
sudo yum install -y pcre-devel python-docutils
@yawn
yawn / gist:5451974
Created April 24, 2013 13:04
Package libvmod-boltsort - needs to be called in the `VMODDIR` of the build environment
fpm -t rpm \
-s dir \
--prefix=/usr/lib64/varnish/vmods \
-n libvmod-boltsort \
-v 1.0.0 \
--iteration `git rev-parse --short HEAD` \
--epoch `date +"%s"` \
-a noarch \
--license 'Apache License 2.0' \
--vendor 'Vimeo, LLC' \
@yawn
yawn / tmux_cheatsheet.markdown
Created November 1, 2012 08:20 — forked from henrik/tmux_cheatsheet.markdown
tmux cheatsheet

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@yawn
yawn / init.pp
Created March 14, 2012 10:23
Enable sudo upstart for a deployment $user
augeas { "Allow upstart operations w/o password":
context => "/files/etc/sudoers",
changes => [
"set Cmnd_Alias[alias/name = \"UPSTART\"]/alias/name UPSTART",
"set Cmnd_Alias[alias/name = \"UPSTART\"]/alias/command[1] /sbin/start",
"set Cmnd_Alias[alias/name = \"UPSTART\"]/alias/command[2] /sbin/stop",
"set Cmnd_Alias[alias/name = \"UPSTART\"]/alias/command[3] /sbin/restart",
"set Cmnd_Alias[alias/name = \"UPSTART\"]/alias/command[4] /sbin/initctl",
"set spec[user = \"${user}\"]/user ${user}",
"set spec[user = \"${user}\"]/host_group/host ALL",
@yawn
yawn / yawn.zsh-theme
Created February 28, 2012 18:27
Fork of skwp.zsh-theme (using the pro terminal)
# Simple theme with RVM prompt
PROMPT='%{$fg[white]%}%~%{$fg[yellow]%}$(git_prompt_info)%{$reset_color%}%{$fg[white]%}: %{$reset_color%}'
RPROMPT='%{$fg[grey]%}$(rvm-prompt v p g)%{$reset_color%}'
ZSH_THEME_GIT_PROMPT_PREFIX=" "
ZSH_THEME_GIT_PROMPT_SUFFIX=" "
ZSH_THEME_GIT_PROMPT_DIRTY=" UF"
ZSH_THEME_GIT_PROMPT_CLEAN=" CL"
java.lang.NegativeArraySizeException: null
org/jruby/util/ByteList.java:339:in `ensure'
org/jruby/RubyString.java:856:in `modify'
org/jruby/RubyString.java:1255:in `cat'
org/jruby/RubyString.java:1221:in `cat19'
org/jruby/RubyArray.java:1488:in `inspectAry'
org/jruby/RubyArray.java:1509:in `inspect'
org/jruby/RubyArray$i$0$0$inspect.gen:65535:in `call'
org/jruby/RubyClass.java:632:in `finvoke'
org/jruby/javasupport/util/RuntimeHelpers.java:545:in `invoke'