Skip to content

Instantly share code, notes, and snippets.

View svperfecta's full-sized avatar
👾

Brian Corrigan svperfecta

👾
View GitHub Profile
@svperfecta
svperfecta / gist:1007717
Created June 4, 2011 08:21
Streamworks Player Embed
<script type="text/javascript" src="http://streamworksflowplayermodifcati.appspot.com/static/player/auditudeBanners.js"></script>
<script type="text/javascript" src="http://streamworksflowplayermodifcati.appspot.com/static/player/flowplayer-3.2.0.min.js"></script>
<a href="" style="display:block !important;width:720px !important;height:480px !important;" id="MLGPlayer"></a>
<script>$f("MLGPlayer", "http://streamworksflowplayermodifcati.appspot.com/static/player/player.swf", {
plugins: {
controls: { streams: "str,stb,halo,cod", akamai:true },
invideous: { url: 'http://streamworksflowplayermodifcati.appspot.com/static/player/invideous.swf', width: "100%", height: "100%", top: 0, left: 0, pid:3771 },
@svperfecta
svperfecta / gist:1007994
Created June 4, 2011 15:43
Streamworks Player Embed with No Autoplay
<script type="text/javascript" src="http://streamworksflowplayermodifcati.appspot.com/static/player/flowplayer-3.2.0.min.js"></script>
<a href="" style="display:block;width:512;height:384" id="MLGPlayer"></a>
<script>
$f("MLGPlayer", "http://streamworksflowplayermodifcati.appspot.com/static/player/player.swf", {
plugins: {
controls: { streams: "str,stb,halo,cod", autoplay:false },
invideous: { url: 'http://streamworksflowplayermodifcati.appspot.com/static/player/invideous.swf', width: "100%", height: "100%", top: 0, left: 0, pid:3771 },
TMPlugin: { url: "http://static.inplay.tubemogul.com/bootloader/TubeMogulFlowPlayer.swf", playerID: "P-W8J-51Q", trackerIDs: "TD-ASG-WXP", displayName:"Default feed" },
@svperfecta
svperfecta / gist:1300185
Created October 20, 2011 01:30
Up and running with Zappa, Mongoose and CoffeeScript
require('zappa') ->
# MongoDB Setup
mongoose = require 'mongoose'
db = mongoose.connect('mongodb://localhost/my_database')
# Declare schema for model
Schema = mongoose.Schema
User = new Schema
name: String
@svperfecta
svperfecta / init.el
Created February 5, 2012 02:24 — forked from mig/init.el
Simple Emacs 24 configuration for Rails development
;; This emacs configuration comes from:
;; http://www.viget.com/extend/emacs-24-rails-development-environment-from-scratch-to-productive-in-5-minu/
;; It's patched to work with el-get 3.1 as noted here:
;; https://github.com/dimitri/el-get
(push "/usr/local/bin" exec-path)
(add-to-list 'load-path "~/.emacs.d")
(setq make-backup-files nil)
(setq auto-save-default nil)
Title
{
TitleId 0x58410A65 ; Siren
UserData "prod"
}
Title
{
TitleId 0x57520FA3 ; Siren (GFWL)
@svperfecta
svperfecta / gist:2853467
Created June 1, 2012 16:43
Rakefile to Generate Emacs CTAGS
# Generate TAGS files with bundler projects. Bundle must be updated, and tags binary
# must be exuberant ctags.
namespace :tags do
namespace :generate do
desc <<-EOT
Generate a new emacs TAGS file for the current project.
Requires exuberant ctags and bundler.
EOT
task :emacs do
@svperfecta
svperfecta / gist:2870878
Created June 4, 2012 21:12
Unicorn Active Connection Monitoring
#!/usr/bin/env ruby
# Copyright: 2011 Opscode, Inc.
# Author: Bryan McLellan <btm@loftninjas.org>
# Modified by: Brian Corrigan 2012
#
# 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
@svperfecta
svperfecta / gist:2875910
Created June 5, 2012 15:56
Submitting GIT patches via email
# Add something to my last commit (forgot a comment!)
git commit --amend -m "New commit message"
# Merge my last two commits
git rebase --interactive HEAD~2
# Create the patch file
git format-patch HEAD~..HEAD
@svperfecta
svperfecta / gist:2896918
Created June 8, 2012 17:07
Random Snippets
# Uninstall all ruby gems
gem list | cut -d" " -f1 | xargs gem uninstall -aIx
# Useful SSH Escape Characters
~. Disconnect.
~^Z Background ssh.
~? Display a list of escape characters.
@svperfecta
svperfecta / gist:2901849
Created June 9, 2012 17:17
Fixing Sphinx
# Error
[Sat Jun 9 17:03:13.111 2012] [ 4912] WARNING: rotating index 'swf_fulltext': rename '/data/sphinx/swf_fulltext.sps' to '/data/lib/sphinx/swf_fulltext.old.sps' failed: No such file or directory
[Sat Jun 9 17:03:13.112 2012] [ 4912] WARNING: rotating index 'swf_fulltext': rename to .old failed; using old index
# Fix
touch /data/lib/swf_fulltext.sps