Skip to content

Instantly share code, notes, and snippets.

View caseypugh's full-sized avatar
🤡
🤡🤡🤡🤡🤡🤡🤡🤡🤡

CPU caseypugh

🤡
🤡🤡🤡🤡🤡🤡🤡🤡🤡
View GitHub Profile
@caseypugh
caseypugh / kickstarter-vhx-embed.html
Last active August 29, 2015 14:03
VHX Video Embed
<iframe src="https://embed.vhx.tv/videos/7702" width="850" height="480" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>
<script>
var postMessage = {},
PLAYER_EMBED_PROTOCOL = 'https://',
PLAYER_EMBED_HOST = 'embed.vhx.tv';
/* post message listener
...................................*/
@caseypugh
caseypugh / hls-debug
Created July 22, 2014 18:54
HLS debugging
hls-1200-00518.ts
#EXTINF:10,
hls-1200-00519.ts
#EXTINF:10,
hls-1200-00520.ts
#EXTINF:10,
hls-1200-00521.ts
#EXTINF:10,
hls-1200-00522.ts
#EXTINF:10,
@caseypugh
caseypugh / desperation.txt
Created August 2, 2014 15:48
Messages from desperate people
LOL
ASSHOLES
SAGAR IS DRUNK.. HOLLERING AT ANY SINGLE LADIES
HI THIS IS MATT SUTER. CAN YOU BUZZ ME IN? TKS!
HI!
@caseypugh
caseypugh / package.js
Created August 25, 2014 22:32
Package scrolling bg select
var total_height = 2000
var container_height = 300
var package_height = 35
var container_ypos = 0 // starting at top
// value between 0 and 1
var scrollbar_pos = container_ypos / (total_height - container_height)
var selected_package = Math.floor(container_ypos + (container_height * scrollbar_pos)) / package_height)
@caseypugh
caseypugh / android-emulation.md
Last active August 29, 2015 14:12
How to setup Android emulation

Install the Android SDK through Homebrew:

brew update && brew install android-sdk

Add the $ANDROID_SDK_ROOT to your shell. By default OS X uses bash. r24.0.1 is the latest version at the time of writing this. This might differ for you. Check brew’s installation output. It has the correct export line in it.

The following command should take care of it:

var jq = document.createElement('script');
jq.src = "https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js";
document.getElementsByTagName('head')[0].appendChild(jq);
// ... give time for script to load, then type.
jQuery.noConflict();
setTimeout(function() {
(function($){$.extend({tablesorter:new
function(){var parsers=[],widgets=[];this.defaults={cssHeader:"header",cssAsc:"headerSortUp",cssDesc:"headerSortDown",cssChildRow:"expand-child",sortInitialOrder:"asc",sortMultiSortKey:"shiftKey",sortForce:null,sortAppend:null,sortLocaleCompare:true,textExtraction:"simple",parsers:{},widgets:[],widgetZebra:{css:["even","odd"]},headers:{},widthFixed:false,cancelSelection:true,sortList:[],headerList:[],dateFormat:"us",decimal:'/\.|\,/g',onRenderHeader:null,selectorHeaders:'thead th',debug:false};function benchmark(s,d){log(s+","+(new Date().getTime()-d.getTime())+"ms");}this.benchmark=benchmark;function log(s){if(typeof console!="undefined"&&typeof console.debug!="undefined"){console.log(s);}else{alert(s);
@caseypugh
caseypugh / gist:e4112988dc012ecaaa20
Created April 12, 2015 19:17
save display state of a series
$(function () {
var visible = getCookie('HCseriesVisible');
console.log(visible);
function saveSeriesState(cvalue) {
var d = new Date();
d.setTime(d.getTime() + (365*24*60*60*1000)); // 1 year coockie
var expires = "expires="+d.toUTCString();
document.cookie = "HCseriesVisible=" + cvalue + "; " + expires;
}
@caseypugh
caseypugh / gist:1217545
Created September 14, 2011 19:35
Megaplaya Advanced Embed
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.3/jquery.min.js"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js"></script>
<script type="text/javascript">
$(document).ready(
function() {
$('#vhx_megaplaya').flash({
swf: 'http://vhx.tv/embed/megaplaya',
width: 850,
allowFullScreen: true,
allowScriptAccess: "always",
@caseypugh
caseypugh / gist:1217546
Created September 14, 2011 19:35
Megaplaya Advanced Embed
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.3/jquery.min.js"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js"></script>
<script type="text/javascript">
$(document).ready(
function() {
$('#vhx_megaplaya').flash({
swf: 'http://vhx.tv/embed/megaplaya',
width: 850,
allowFullScreen: true,
allowScriptAccess: "always",
@caseypugh
caseypugh / megaplaya-advanced-embed.html
Created September 14, 2011 19:35
Megaplaya Advanced Embed
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.3/jquery.min.js"></script>
<script type="text/javascript" src="http://vhx.tv/javascripts/jquery.swfobject-1.1.1.js"></script>
<script type="text/javascript">
$(document).ready(
function() {
$('#vhx_megaplaya').flash({
swf: 'http://vhx.tv/embed/megaplaya.swf',
width: 850,
allowFullScreen: true,