Skip to content

Instantly share code, notes, and snippets.

View nhaskins's full-sized avatar

Nathan A Haskins nhaskins

  • Haskins Information Technology LLC
  • St Louis, MO
View GitHub Profile
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Oculus.Platform;
//note: Must have Oculus Platform SDK for Unity installed!
public class OculusEntitlementCheck : MonoBehaviour {
// Use this for initialization
<link rel="import" href="../core-scaffold/core-scaffold.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-menu/core-menu.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-menu/core-submenu.html">
<polymer-element name="my-element">
<?php
/**
* The template for displaying all pages
*
* This is the template that displays all pages by default.
* Please note that this is the WordPress construct of pages and that
* other 'pages' on your WordPress site will use a different template.
*
* @package WordPress
* @subpackage Twenty_Fourteen
@nhaskins
nhaskins / rglob
Created December 28, 2013 18:00
#php directory recursive search for files by an extension, return as array.
<?php
// $Id: rglob.php,v 1.0 2008/11/24 17:20:00 hm2k Exp $
/**
* Recursive glob()
*/
/**
* @param int $pattern
* the pattern passed to glob()
@nhaskins
nhaskins / gist:7171761
Created October 26, 2013 16:50
Hack the Stacks talent
Andrew
================
- python / php / js / html / bash
- nosql logging db system
- wowza streaming (live streaming)
Bradley
================
- admin / org / coordination
- php
@nhaskins
nhaskins / gist:5100705
Created March 6, 2013 16:35
PHP function to generate Google Calendar 'add event' links
//this function returns a URL that when clicked, attempts to add a gcal event
function gcal_evt_href($data)
{
//return a gcal href link for anchors
//encode the data in the array for url formatting
foreach($data as &$xx)
{
$xx = urlencode($xx);
}
@nhaskins
nhaskins / gist:1160945
Created August 21, 2011 18:18
old jhaskins.com wp-upload photo gallery
<?php
/*
Template Name: Showcase
*/
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
@nhaskins
nhaskins / mailchimp table converter
Created May 11, 2010 02:08
mailchimp table cleaner/font tag adder
//fontThisTable() inserts font tags before and after all the td tags. Size and style are optional.
function fontThisTable($someTable, $fontSize, $fontStyle){
if(!$fontSize){$fontSize = '2';}
if(!$fontStyle){$fontStyle = 'Arial';}
$someTable = preg_replace('|<td.*?>|', '<td>', $someTable);
$someTable = preg_replace('|<td>|', '<td><font face="'.$fontStyle.'" size="'.$fontSize.'">', $someTable);
$someTable = preg_replace('|</td>|', '</font></td>', $someTable);
return $someTable;
@nhaskins
nhaskins / wordpress nextgen gallery snippits
Created May 10, 2010 01:21
wordpress nextgen gallery snippits
@nhaskins
nhaskins / wordpress override site URL
Created May 10, 2010 01:20
wordpress override site URL
define('WP_HOME','http://');
define('WP_SITEURL','http://');
//add this to the wp-config.php file, omit the trailing slash in the URL
//damn helpful if you move a site, and forget to update the site info