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 / 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 / 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 / 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 / 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 / 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 / bot.rb
Created August 26, 2013 19:08
Lorea Assembly bot is a baby Cinch.
$:<< File.expand_path(File.join(File.dirname(__FILE__), 'lib'))
require 'cinch'
class TurnBot
include Cinch::Plugin
def initialize(*args)
super
@turns = []
@hellekin
hellekin / unbound.conf
Created November 18, 2013 01:31
Resolve .bit with unbound without running namecoin. (Poor man's alternate root)
# Resolve dot-bit
forward-zone:
name: "bit"
forward-addr: 178.32.31.41
forward-addr: 178.63.16.21
forward-first: yes
@hellekin
hellekin / rant.md
Last active August 29, 2015 14:04 — forked from vito-lbs/rant.md

I don't think people understand what arms dealers really do. They invest thousands of man and computer hours into designing killingry which people are willing to pay lots of money for. As a business, they want to keep their customer base happy, which means allowing their customers (yes, presumably the NSA/FBI/etc.) to use their weapons rather than not selling them. Yes, it's probably the case that these weapons don't just go to nabbing child pornographers or drug traffickers, they also probably try to catch the next Snowden, which not everyone agrees is The Right Thing To Do. But for what it's worth, I'd still trust the US government (even with all its faults) far more

# ## wiki.example.org #

server {

listen 80; listen 443 ssl;

@hellekin
hellekin / -
Created September 8, 2014 23:12
#!/bin/sh
username="user"
password="pwd"
ipv4addr="127.0.0.1"
TWISTER="/usr/local/bin/twisterd"
ARGS="-rpcuser=$username -rpcpassword=$password -rpcallowip=$ipv4addr"
exec $TWISTER $ARGS $@