Skip to content

Instantly share code, notes, and snippets.

View jbroadway's full-sized avatar

John de Plume jbroadway

View GitHub Profile
@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;
@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 / 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');
@wholmgren
wholmgren / use-bbdiff
Last active February 26, 2024 02:02
set git difftool to bbdiff
git config --global diff.tool bbdiff
git config --global difftool.bbdiff.cmd 'bbdiff --wait --resume "$LOCAL" "$REMOTE"'
git config --global difftool.prompt false
git config --global merge.tool bbdiff
git config --global mergetool.bbdiff.cmd 'bbdiff --wait --resume "$LOCAL" "$REMOTE"'
Double check ~/.gitconfig
@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">
@lelandbatey
lelandbatey / whiteboardCleaner.md
Last active April 25, 2024 02:01
Whiteboard Picture Cleaner - Shell one-liner/script to clean up and beautify photos of whiteboards!

Description

This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"

Results

@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
@dariocravero
dariocravero / README.md
Created October 20, 2012 05:25
Save files in Meteor

Create a Meteor app and put the client_/server_ files in a client/server directories. Also, create a public dir to save the uploaded files.

@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);
}