Skip to content

Instantly share code, notes, and snippets.

View mpdude's full-sized avatar
💭
Coding

Matthias Pigulla mpdude

💭
Coding
View GitHub Profile
@mpdude
mpdude / socket.io-1-0-apache-2.4-ssl.conf
Created December 16, 2015 08:40 — forked from iacchus/socket.io-1-0-apache-2.4-ssl.conf
Set reverse proxy websockets in Apache 2.4 using socket.io 1.0. Needs mod_rewrite module, this version uses SSL. As seen here https://serverfault.com/questions/616370/configuring-apache-2-4-mod-proxy-wstunnel-for-socket-io-1-0
<VirtualHost *:80>
ServerName forum.example.com
Redirect permanent / https://forum.example.com
</VirtualHost>
<VirtualHost *:443>
ServerName forum.example.com
@mpdude
mpdude / apache-2.2-mod_remoteip.c
Created December 3, 2011 13:04 — forked from bfg/apache-2.2-mod_remoteip.c
Working backport (doesn't crash when using Allow/Deny ACLs) of Apache 2.3 module mod_remoteip to Apache 2.2.x
/* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
@mpdude
mpdude / phpstorm-init-vcs-roots
Created November 11, 2014 11:42
Initialize .idea/vcs.xml file with all Git or Mercurial repos below current directory
#!/usr/bin/env php
<?php
print <<<HEAD
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
HEAD;
@mpdude
mpdude / 0004-oversize-dns.diff
Created November 10, 2014 10:12
Patch Ubuntu netqmail-1.06 to handle DNS packets >512 byte and remove unneeded CNAME checks
--- qmail-1.03/dns.c.103 Mon Aug 17 16:06:58 1998
+++ qmail-1.03/dns.c Wed Aug 26 16:28:56 1998
@@ -21,10 +21,12 @@
static unsigned short getshort(c) unsigned char *c;
{ unsigned short u; u = c[0]; return (u << 8) + c[1]; }
-static union { HEADER hdr; unsigned char buf[PACKETSZ]; } response;
+static struct { unsigned char *buf; } response;
+static int responsebuflen = 0;
static int responselen;
@mpdude
mpdude / Portfile
Created April 16, 2014 08:22
MacPorts Portfile for APCu
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4
# $Id: $
PortSystem 1.0
PortGroup php 1.1
name php-APCu
version 4.0.4
categories php devel