Skip to content

Instantly share code, notes, and snippets.

@shkitch
shkitch / bash-arrays.sh
Last active February 17, 2017 08:26
A demonstration of bash arrays.
#!/bin/bash
#
# A demonstration of bash arrays. See the secions titled "Arrays" and
# "Parameter Expansion" in the bash man page for details.
#
declare -A array;
array[a]="1";
array[b]="2";
array[c]="3";
array[d]="4";
@bfg
bfg / apache-2.2-mod_remoteip.c
Created June 23, 2011 09:32
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