Skip to content

Instantly share code, notes, and snippets.

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

CPU caseypugh

🤡
🤡🤡🤡🤡🤡🤡🤡🤡🤡
View GitHub Profile
@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 / 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 / gist:6090895
Created July 26, 2013 18:01
Kickstarter suspicious money script
var total=0;$('#what-you-get li').each(function(i, el) {
var price = parseInt($(el).find('h5').html().match(/Pledge \$([0-9\,]+)/)[1].replace(',',''));
var backers = parseInt($(el).find('.num-backers').html());
total += price * backers;
});
console.log(total);
$('[data-pledged]').data('pledged') - total;
@caseypugh
caseypugh / vhx-asana-theme.css
Created July 15, 2012 18:03
A dark CSS theme for Asana
body {
background: #191919 !important;
font-family: Arial !important;
}
#project_header { background: #fff !important; }
#header {
background: #191919 url('http://vhx.tv/images/vhx-logo-crystal.png') 25px 60px no-repeat !important;
padding-top: 20px !important;
height: 120px;
@caseypugh
caseypugh / easy-git.rdoc
Created June 18, 2012 15:51
GIT MADE EASY

Install jamiew’s git-friendly: github.com/jamiew/git-friendly

Some common shorthands I use - type these into your terminal

git config --global alias.st "status -s"
git config --global alias.ca "commit -a -m"

Checkout new repo

git clone git@github.com:vhx/watchlater
@caseypugh
caseypugh / gist:2380265
Created April 13, 2012 21:22
Rails Setup alpha
1. Install Homebrew (http://mxcl.github.com/homebrew/)
Homebrew makes the Terminal Life Easy™ by making it simple to install any sort of application. This is important mainly because it manages everything for you. For example, you can install mysql by just doing "brew install mysql". it does all the magic of setting it up and might give you some extra instructions after it's done. Uninstalling is just as easy - brew uninstall mysql. If you're looking for a specific app, you can do a search too: brew search ruby. There's also tons of stupid apps like "figlet" which allows you to generate custom ASCII art (http://www.figlet.org/ or brew install figlet)
2. Git (http://git-scm.com/download)
This should be pretty straight forward in terms of installing, but i have some tricks that can make Git much simpler than it is.
- .git/config
This is a hidden folder in all your git checkouts. In your terminal go to a git repo and type "mate .git/config". This will open git's config file which can be enlightening. You c
@caseypugh
caseypugh / vhx_hipchat.php
Created November 22, 2011 23:17
Send your VHX shares to HipChat
<?
///
// Sample usage:
// php vhx_hipchat.php staff myroom authtoken
//
// Screenshot: http://sht.tl/xeT
//
$vhx_user = $argv[1]; // staff
@caseypugh
caseypugh / gifplayer.as
Created September 23, 2011 18:26
GIFPlayer - How to resize an animated GIF
// See http://www.bytearray.org/?p=95
// Insert into GIFPlayer.as
import flash.geom.Rectangle;
public function resize(w:Number, h:Number):void
{
for (var i = 0; i < aFrames.length; i++) {
aFrames[i].resize(w, h);
}
}
@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,
@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",