Skip to content

Instantly share code, notes, and snippets.

View nikdoof's full-sized avatar
👋

Andrew Williams nikdoof

👋
View GitHub Profile
@luckman212
luckman212 / dpinger_static_routes.php
Last active July 18, 2023 22:58
dpinger_static_routes.php - helper script related to https://github.com/pfsense/pfsense/pull/4591
<?php
// includes
require_once("functions.inc");
require_once("system.inc");
require_once("util.inc");
// global dpinger_dont_add_static_routes option
$dp_global_sr_disable = (isset($config['system']['dpinger_dont_add_static_routes']) ? 'ENABLED (checked)' : 'default (unchecked)');
printf("==> global `dpinger_dont_add_static_routes` setting: %s\n", $dp_global_sr_disable);
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active May 10, 2024 20:54
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@alvarow
alvarow / squid-xff-log.conf
Created February 9, 2017 21:49
Sets Squid Proxy to log IP address from X-Forwarded-For header instead of the real client ip address if the X-Forwarded-For header exists.
# Has XFF header with a value
acl has-xff req_header X-Forwarded-For ^(([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)|(\[([0-9a-f]+)?:([0-9a-f:]+)?:([0-9a-f]+|0-9\.]+)?\]))
# default logformat
logformat squid %ts.%03tu %6tr %>a %Ss/%03>Hs %<st %rm %ru %[un %Sh/%<a %mt
# default logformat using XFF instead of client IP address
logformat squid-xff %ts.%03tu %6tr %{X-Forwarded-For}>h %Ss/%03>Hs %<st %rm %ru %[un %Sh/%<a %mt
@maclennann
maclennann / README.md
Last active January 5, 2020 03:07
Exchange Availability Dashing Widget

This is a dashing job to find users' availability in their Exchange calendar and puts it on a dashboard.

Note: I am not a rubyist. I'd certainly welcome some idiomadicy lessons in the comments.

Setup

Drop ews-availability.rb in jobs/ (or dashing install b084fa409966f22badaf), and add the following settings to config.ru:

@goldsmith
goldsmith / numpy_os_x_10_9.sh
Last active January 6, 2024 07:25
How to install Numpy and Scipy on Mac OS X Mavericks (10.9) using Pip.
# set up flags for Numpy C extentions compiling
export CFLAGS="-arch i386 -arch x86_64"
export FFLAGS="-m32 -m64"
export LDFLAGS="-Wall -undefined dynamic_lookup -bundle -arch i386 -arch x86_64"
export CC=gcc-4.2
export CXX="g++ -arch i386 -arch x86_64"
pip install numpy
# success!