Skip to content

Instantly share code, notes, and snippets.

View pwhelan's full-sized avatar

Phillip Whelan pwhelan

View GitHub Profile
@pwhelan
pwhelan / gist:8776916
Created February 2, 2014 23:54
Make asynchronous calls synchronous in PHP 5.5 with generators!
We couldn’t find that file to show.
@pwhelan
pwhelan / alluvium.conf
Last active August 29, 2015 13:56
Apache config for eman
<VirtualHost *:80>
ServerName alluvium.dev
ServerAdmin psikmike@yahoo.com
DocumentRoot /home/psikmike/Code/eman/public
DirectoryIndex index.php
SetEnv APPLICATION_ENV "development"
@pwhelan
pwhelan / .htaccess
Created March 3, 2014 10:28
HTaccess File
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
#Checks to see if the user is attempting to access a valid file,
#such as an image or css document, if this isn't true it sends the
#request to index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [QSA,L]
We couldn’t find that file to show.
01. 0:00:00 Terranoise - Shifting Patterns
02. 0:05:26 Sick Noise vs Inner Coma - Amino Acid
03. 0:09:42 KinDzaDza - BilaNebuba
04. 0:14:22 Paralocks - Tactical Error
05. 0:19:00 Mergel - Morning Delirium
06. 0:24:20 Organoise - Inside-Out-R-Space
07. 0:44:34 Damaru Records - Breakdown 167 bpm
08. 0:50:26 Audiopathik - Mind-Meld
09. 0:53:50 Furious - Mutant 25 (Mimic Vat Remix) 172
10. 1:00:24 Mr Hades - Orchestra
@pwhelan
pwhelan / timed-loop-closure.js
Created February 28, 2012 04:06
Tail Recursion to infinite timed loop in Node.js... with Closures!
function loop() {
var start_date = Date.now()
var old_date = start_date
var seconds_running = 120
var intervalId = setInterval(1000, function() {
new_date = Date.now()
// Execute this for just 30 seconds
if( (new_date - start_date) < 1000 * seconds_running) {
@pwhelan
pwhelan / gist:2143197
Created March 21, 2012 00:51
Smoothslider
// ----------------- BEGIN SmoothSlider functions -----------------
SmoothSlider = function() {}
SmoothSlider.Step = 0.7;
SmoothSlider.Steps = 127;
SmoothSlider.generateTable = function(mrange, step)
{
var sliderTable = new Array();
var range = Math.round(mrange * 100);
if (( range % 10 ) && (range != 8))
@pwhelan
pwhelan / embed_book_now-1.html
Created May 2, 2012 08:38
Embed code for Book Now button popup
<script src="https://book.click4time.com/js/cp_window.js"></script>
<a onClick="open_new_window('https://book.click4time.com/sassonabaron/book/step1')" href="#" title="Book Online">
<img src="http://book.click4time.com/images/buttons/large_blue_bevel.png" alt="Book online now" border="0" />
</a>
@pwhelan
pwhelan / embed-code-script.js
Created May 2, 2012 08:48
Simple script that can be included directly to generate the book now button
var bookNowButtonGenerate = function() {
var open_new_window = function(URL)
{
var opts = "toolbar=no,menubar=0,status=1,copyhistory=0,scrollbars=yes"
",resizable=1,location=0,Width=1065,Height=760";
var click4time_window = window.open('', "_blank", opts);
click4time_window.location = URL;
};
var stepURL = 'https://book.click4time.com/sassonabaron/book/step1';
var imgURL = 'http://book.click4time.com/images/buttons/large_blue_bevel.png';
@pwhelan
pwhelan / gist:2803736
Created May 27, 2012 10:49
A snippet with slip mode for Mixxx
DJTTCueMaster.beatloopInt = function(group, on, beats)
{
if (on) {
if (this.bstk.length == 0) {
var slipmodestatus = {
rate: engine.getValue(group, 'rate'),
startplaypos: engine.getValue(group, 'playposition'),
curplaypos: engine.getValue(group, 'playposition')
};