Skip to content

Instantly share code, notes, and snippets.

View hellekin's full-sized avatar
💭
---____________________________

Free software is active resistance. hellekin

💭
---____________________________
View GitHub Profile
@hellekin
hellekin / nginx-tls-forward-secrecy.conf
Last active December 19, 2015 09:39
Get an 'A' at SSL Labs with Nginx, and protect your users with perfect forward secrecy. https://www.ssllabs.com/ssltest/index.html
server {
listen 443 ssl;
server_name snowden.example.net;
root /privacy/matters;
index index.html;
ssl on;
ssl_certificate ssl/example.net/snowden.crt.pem;
ssl_certificate_key ssl/example.net/snowden.key.pem;
@hellekin
hellekin / getpass
Created May 4, 2013 13:15
Using Awk and GPG to protect authinfo network credentials with .netrc
#! /bin/zsh
#
## Get password from an encrypted .netrc file
#
# Copyright 2013 hellekin <hellekin@cepheide.org>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
@hellekin
hellekin / autop.org
Created November 5, 2012 23:47
Analysis of Elgg's (that is: Wordpress') autop()

Analyzing autop()

The Function

/**
 * Create paragraphs from text with line spacing
 * Borrowed from Wordpress.
 *
 * @param string $pee The string
@hellekin
hellekin / COPYING
Created August 13, 2012 01:10
Nginx for Elgg 1.8 with Lorea flavor
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
@hellekin
hellekin / README
Created June 12, 2012 19:06
Running Piwik behind Nginx
Explanation of the setup:
- a frontend server runs Nginx
- a backend server runs the PHP application
In the original setup, both are virtual machines on the same host, and we can mount parts of the piwik to the frontend. YMMV (the security.limit_extensions would include also .js and .css without that possibility)
@hellekin
hellekin / flattr-lorea.md
Created December 15, 2011 07:10
Flattr Lorea

Flattr this git repo

@hellekin
hellekin / .zsh-prompt
Created November 28, 2011 19:43
not yet a promptinit theme, but pretty nice already
# -*- sh-mode -*-
#
## ZSH PROMPT
#
# {{{ PROMPT SETTINGS
PROMPT_SUBST=1 # Enable prompt expansion
PROMPT_BANG=1 # Enable ! as history event number
PROMPT_PERCENT=1 # Enable % parameter expansion
@hellekin
hellekin / zsh_raster
Created November 28, 2011 17:01
Display an animated colored bar in zsh
#
# ZSH Raster -- Spice up your .zshrc
#
# {{{ Copyright 2011 Hellekin O. Wolf <hellekinλcepheide*org>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
@hellekin
hellekin / address.rb
Created February 6, 2011 23:43
A Rack middleware (at this point, for Rails) to handle Nginx mail authentication proxy.
#
# == Mail::Address extensions
#
# Add support for local extension: user+extension@domain.tld
#
module Mail
class Address
def local_user
local.to_s.split('+', 2).first
end
We couldn’t find that file to show.