Skip to content

Instantly share code, notes, and snippets.

View gauntface's full-sized avatar
🤓
Mon-Fri: Working. Sat-Sun: Not Working.

Matt Gaunt-Seo gauntface

🤓
Mon-Fri: Working. Sat-Sun: Not Working.
View GitHub Profile
@gauntface
gauntface / focusableItem.js
Created December 27, 2012 17:14
focusableItem.js - Entire interface to see the relevant methods
// Copyright 2012 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS-IS" BASIS,
@gauntface
gauntface / gridFocusableItem.js
Created December 27, 2012 17:17
gridFocusableItem.js - Example class for focusing on grid items
// Copyright 2012 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS-IS" BASIS,
@gauntface
gauntface / focusController.js
Created December 27, 2012 17:37
focusController.js - Adding and removing focusable items
...
/**
* Remove a focusable item from the controller
* @param {FocusableItem} item The item to remove
*/
this.removeFocusableItem = function (item) {
for(var i = 0; i < focusableItems.length; i++) {
if(focusableItems[i] == item) {
focusableItems.splice(i, 1);
@gauntface
gauntface / gist:4434765
Created January 2, 2013 13:58
Setting up a global gitignore file
git config --global core.excludesfile ~/.gitignore_global
nano ~/.gitignore_global
@gauntface
gauntface / gist:4434776
Last active December 10, 2015 12:28
My git ignore lines
.project
.settings
.idea
# built application files
*.apk
*.ap_
# files for the dex VM
*.dex
@gauntface
gauntface / compass_watch.sh
Created January 27, 2013 18:32
Compass watch commands
cd ~/Sites/Example/
compass watch ./
@gauntface
gauntface / fullscreen.js
Created February 19, 2013 15:39
A small piece of code showing the initial set up of the messaging between web and native
var videoPlayerController;
if(fullscreenPage.isEmbedded()) {
videoPlayerController = new NativeVideoPlayerController();
window.fullscreenPage = fullscreenPage;
} else {
videoPlayerController = new WebVideoPlayerController('video-container');
}
@gauntface
gauntface / fullscreen.js
Created February 19, 2013 15:46
A short snippet to demonstrating the kicking off of video playback
/**
* Set the up video player
* @function
*/
FullscreenPage.prototype.setUpVideoPlayer = function () {
var videoPlayerController = this.getVideoPlayerController();
var videoControlsController = this.getVideoControlsController();
var videoDataController = this.getVideoDataController();
var videoData = videoDataController.getVideoData(this.getCategoryIndex())[this.getItemIndex()];
videoPlayerController.setVideoUrl(videoData.src);
@gauntface
gauntface / genericVideoPlayerController.js
Created February 19, 2013 15:52
The constructor of GenericVideoPlayerController
/**
* This class is meant to be inherited to control Video playback and then
* each class handles a different method of playback
*
* @constructor
*/
function GenericVideoPlayerController() {
var playerCallback = null;
var videoUrl = null;
@gauntface
gauntface / nativeVideoPlayerController.js
Created February 19, 2013 16:03
Sample of the NativeVideoPlayerController class
NativeVideoPlayerController.prototype = new GenericVideoPlayerController();
/**
* This handles the playback through a native VideoView rather than a HTML5
* video tag
*
* @constructor
* @augments GenericVideoPlayerController
*/
function NativeVideoPlayerController() {