Skip to content

Instantly share code, notes, and snippets.

View jbroadway's full-sized avatar

John de Plume jbroadway

View GitHub Profile
@jbroadway
jbroadway / style.css
Last active August 29, 2015 14:04
Minimal Responsive Grid System.
/**
* Minimal Responsive Grid System.
*
* Usage:
*
* <div class="row">
* <div class="unit-75">
* <h1>Body</h1>
* </div>
* <div class="unit-25">
@jbroadway
jbroadway / bootstrap.php
Last active August 29, 2015 14:06
Bootstrap file for the Elefant CMS to hide a site behind HTTP Basic auth.
<?php
/**
* Implements HTTP Basic auth to hide your site
* until it's ready to go live. Based on:
*
* https://gist.github.com/jbroadway/9a18f84ad6be671eb22d
*/
if (! $controller->cli) {
conf ('General', 'master_username', 'USERNAME');
@KeanW
KeanW / MainActivity.java
Last active September 30, 2015 15:38
Primary file for using the Cardboard SDK for Android with the stereoscopic A360 web samples
package com.autodesk.a360cardboard;
import com.google.vrtoolkit.cardboard.CardboardActivity;
import android.annotation.SuppressLint;
import android.content.Context;
import android.os.Build;
import android.os.Bundle;
import android.os.Vibrator;
import android.util.Log;
@jbroadway
jbroadway / api.js
Created June 27, 2012 17:52
API wrapper example for use with Elefant's Restful class
// the api for accessing the site
var api = (function ($) {
var self = {};
// the prefix for api requests
self.prefix = '/myapi/v1/';
// enable/disable debugging output to the console
self.debug = false;
@jbroadway
jbroadway / au
Last active January 2, 2016 06:08
A thin wrapper around ffmpeg to make it easier to perform common audio manipulations like cutting to a specific number of beats at a set BPM, volume adjustments, joining files together, and converting between file formats or between mono and stereo. Note: This project has been moved to https://github.com/jbroadway/au
This project has been moved to:
https://github.com/jbroadway/au
@jbroadway
jbroadway / Dockerfile
Last active February 4, 2016 02:00
Dockerfile for Nginx + PHP server.
FROM ubuntu:13.04
MAINTAINER Johnny Broadway "johnny@johnnybroadway.com"
RUN apt-get update
RUN apt-get install -y wget git vim postfix nginx sqlite
RUN apt-get install -y mysql-server mysql-client
RUN apt-get install -y php5-cli php5-common php5-mysql php5-sqlite php5-curl php5-fpm
RUN wget -O /etc/nginx/sites-available/default https://gist.github.com/jbroadway/6369183/raw/682a1ed8078cc39f59c3624f460b128addff95db/nginx-default
@jbroadway
jbroadway / .htaccess
Last active June 6, 2016 19:14
Elefant CMS Subfolder Proxy
<IfModule mod_rewrite.c>
Options -MultiViews
RewriteEngine On
#RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f [OR]
RewriteCond %{REQUEST_FILENAME} \.(js|css)$
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . subfolder.php [L]
</IfModule>
using UnityEngine;
using System.Collections;
using DaikonForge.VoIP;
using System;
public class MyLocalVoiceController : VoiceControllerBase
{
public PhotonView photonView;
@KeanW
KeanW / MainActivity.java
Last active October 16, 2017 17:02
Primary file for using the Oculus Mobile SDK with the stereoscopic A360 web samples
package oculus;
import android.os.Bundle;
import android.util.Log;
import android.view.KeyEvent;
import android.view.MotionEvent;
import android.view.Window;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;
@jbroadway
jbroadway / app.js
Created June 27, 2012 18:05
Simple History.js-based client-side router
var app = (function ($) {
var self = {};
// change pages via app.go('/new/page') or app.go(-1)
self.go = function (url) {
if (url === parseInt (url)) {
History.go (url);
} else {
History.pushState (null, null, url);
}