Skip to content

Instantly share code, notes, and snippets.

@birarda
birarda / gist:5139554
Created March 12, 2013 01:36
Basecamp to-dos to HipChat
require "net/https"
require "uri"
require "json"
$filename = "timestamp.txt"
$time_format = "%Y-%m-%dT%H:%M:%S%z"
def event_request(timestamp, page = 1)
# setup a GET request to the basecamp API
bc_url = "https://basecamp.com/#{ENV['BASECAMP_ID']}/api/v1/events.json?since=#{timestamp}"
const float DISTANCE_REVERB_LOG_REMAINDER = 0.32f;
const float DISTANCE_REVERB_MAX_WETNESS = 1.0f;
float effectMix = powf(2.0f, (0.5f * logf(distanceSquareToSource) / logf(2.0f)) - DISTANCE_REVERB_LOG_REMAINDER) * DISTANCE_REVERB_MAX_WETNESS / 64.0f;
var PLANE_MAX_HEIGHT = 500.0;
var METER = 1.0 / TREE_SCALE;
var ORB_METERS = 8;
var ORB_UNITS = ORB_METERS * METER;
var orbHeight = 200 * METER;
var lastOrbPosition = { x: 256 * METER, y: 256 * METER};
@birarda
birarda / gist:7453848
Created November 13, 2013 18:25
Qt5 Patched Formula to remove CoreWLAN on OS X
require 'formula'
class Qt5 < Formula
homepage 'http://qt-project.org/'
url 'https://dl.dropboxusercontent.com/u/1864924/5.2.0-beta1/qt-everywhere-opensource-nocorewlan-src-5.2.0-beta1.tar.gz'
sha1 'd9f646fd2e9ed6e086350b767ee5da81bca9e16b'
head 'git://gitorious.org/qt/qt5.git', :branch => 'stable'
bottle do
revision 1
// Ported from Stefan Gustavson's java implementation
// http://staffwww.itn.liu.se/~stegu/simplexnoise/simplexnoise.pdf
// Read Stefan's excellent paper for details on how this code works.
//
// Sean McCullough banksean@gmail.com
/**
* You can pass in a random number generator object if you like.
* It is assumed to have a random() method.
*/
@birarda
birarda / gist:9468210
Last active August 29, 2015 13:57
FindQxmpp
# Try to find the qxmpp library
#
# You can provide a QXMPP_ROOT_DIR which contains lib and include directories
#
# Once done this will define
#
# QXMPP_FOUND - system found qxmpp
# QXMPP_INCLUDE_DIRS - the qxmpp include directory
# QXMPP_LIBRARIES - Link this to use qxmpp
#
@birarda
birarda / perlin.js
Created April 14, 2014 19:53
landscape generation script for High Fidelity
//
// perlin.js
//
// Copyright 2013 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
// Ported from Stefan Gustavson's java implementation
@birarda
birarda / auth_with_access_token.patch
Created May 2, 2014 17:14
Patch to allow doorkeeper authorization with an existing access token
From e29f4f1b84d77185bc0f2b98caaecf4d6f76d676 Mon Sep 17 00:00:00 2001
From: Stephen Birarda <commit@birarda.com>
Date: Fri, 2 May 2014 10:12:51 -0700
Subject: [PATCH] patch to allow doorkeeper authorization with access_token
---
app/views/doorkeeper/authorizations/new.html.erb | 2 ++
config/initializers/doorkeeper.rb | 8 +++++++-
2 files changed, 9 insertions(+), 1 deletion(-)

Keybase proof

I hereby claim:

  • I am birarda on github.
  • I am birarda (https://keybase.io/birarda) on keybase.
  • I have a public key whose fingerprint is 1DCA 918D C7D7 52B9 1473 53D9 4ECC EBDD 8CC4 EE2A

To claim this, I am signing this object:

--- qt-everywhere-opensource-src-5.2.1/qtbase/src/plugins/bearer/corewlan/qcorewlanengine.mm 2014-05-16 14:21:30.000000000 -0700
+++ qt-everywhere-opensource-src-5.2.1/qtbase/src/plugins/bearer/corewlan/qcorewlanengine.mm 2014-05-16 14:21:43.000000000 -0700
@@ -62,6 +62,7 @@
#include <net/if.h>
#include <ifaddrs.h>
+#ifndef QT_NO_BEARERMANAGEMENT
#if QT_MAC_PLATFORM_SDK_EQUAL_OR_ABOVE(__MAC_10_7, __IPHONE_NA)
@interface QT_MANGLE_NAMESPACE(QNSListener) : NSObject