Skip to content

Instantly share code, notes, and snippets.

Brane F. Gračnar bfg

Block or report user

Report or block bfg

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@bfg
bfg / osx_gnu_utils_usage
Created Sep 12, 2016
Shell (.profile/.bash_profile) script fragment for osx that installs gnu utils using brew
View osx_gnu_utils_usage
#
# shell dot-profile fragment
#
is_osx() {
test "$(uname -s)" = "Darwin"
}
check_is_osx() {
if ! is_osx; then
View keybase.md

Keybase proof

I hereby claim:

  • I am bfg on github.
  • I am gracnar (https://keybase.io/gracnar) on keybase.
  • I have a public key whose fingerprint is 9899 6477 8792 203C EDCB 3683 0EAD 2EB5 F590 D619

To claim this, I am signing this object:

View .tmux.conf
#
# tmux configuration
#
# remap CTRL+B => CTRL+A (screen like shit)
set -g prefix C-a
unbind C-b
# bind PREFIX + r => reload tmux config && print notice
bind r source-file ~/.tmux.conf \; display "tmux configuration was reloaded!"
View gist:6377619
import java.util.*;
import com.maxmind.geoip.*;
public class L {
public static void main (String[] args) throws Exception {
// initialize lookup services...
ArrayList<LookupService> svcs = new ArrayList<LookupService>();
svcs.add(new LookupService("/usr/share/GeoIP/GeoIPv6.dat"));
svcs.add(new LookupService("/usr/share/GeoIP/GeoIP.dat"));
@bfg
bfg / ngx_http_smooth_streaming-1.4.24-ism_rewrite_engine.patch
Created Dec 21, 2011
CodeShop ngx_http_smooth_streaming module patch, whichs adds configuration flag ism_rewrite_engine {on=default|off}; You can disable built-in rewrite engine with this patch. Applies to version 1.4.24; sample configuration: http://pastebin.com/HY9Wy6TD
View ngx_http_smooth_streaming-1.4.24-ism_rewrite_engine.patch
diff -ur orig.nginx_mod_smooth_streaming-1.4.24/src/ngx_http_streaming_module.c nginx_mod_smooth_streaming-1.4.24/src/ngx_http_streaming_module.c
--- orig.nginx_mod_smooth_streaming-1.4.24/src/ngx_http_streaming_module.c 2011-04-24 16:55:51.000000000 +0200
+++ nginx_mod_smooth_streaming-1.4.24/src/ngx_http_streaming_module.c 2011-12-21 01:21:03.058062179 +0100
@@ -70,6 +70,13 @@
*/
#endif
+/**
+ * Configuration structure for the smooth streaming module.
+ */
@bfg
bfg / apache-2.2-mod_remoteip.c
Created Jun 23, 2011
Working backport (doesn't crash when using Allow/Deny ACLs) of Apache 2.3 module mod_remoteip to Apache 2.2.x
View apache-2.2-mod_remoteip.c
/* 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
@bfg
bfg / gist:668326
Created Nov 8, 2010
Mojolicious async external command execution using POE (this blocks for no good reason)
View gist:668326
#!/usr/bin/perl
# $Id: receiver_manage.pl 1977 2010-10-14 09:12:15Z bfg $
# $Date: 2010-10-14 11:12:15 +0200 (Thu, 14 Oct 2010) $
# $Author: bfg $
# $Revision: 1977 $
# $LastChangedRevision: 1977 $
# $LastChangedBy: bfg $
# $LastChangedDate: 2010-10-14 11:12:15 +0200 (Thu, 14 Oct 2010) $
# $URL: https://svn.interseek.com/repositories/admin/misc/cic/receiver_manage.pl $
@bfg
bfg / gist:668320
Created Nov 8, 2010
mojolicious async external command execution using Mojo::IOLoop
View gist:668320
#!/usr/bin/perl
# $Id: receiver_manage.pl 1977 2010-10-14 09:12:15Z bfg $
# $Date: 2010-10-14 11:12:15 +0200 (Thu, 14 Oct 2010) $
# $Author: bfg $
# $Revision: 1977 $
# $LastChangedRevision: 1977 $
# $LastChangedBy: bfg $
# $LastChangedDate: 2010-10-14 11:12:15 +0200 (Thu, 14 Oct 2010) $
# $URL: https://svn.interseek.com/repositories/admin/misc/cic/receiver_manage.pl $
You can’t perform that action at this time.