Skip to content

Instantly share code, notes, and snippets.

View codegangsta's full-sized avatar

Jeremy Saenz codegangsta

View GitHub Profile
<script>
// initialize the wistia queue if it hasn't already been initialized
window._wq = window._wq || [];
// Push your callback onto the queue
_wq.push({ "YOUR_WISTIA_VIDEO_ID": function(video) {
// Make any calls you want to the video handle
video.play();
}});
</script>
<div class='embed-container'>
<iframe src='https://www.youtube.com/embed//{ YOUR VIDEO CODE }' frameborder='0' allowfullscreen></iframe>
</div>
@codegangsta
codegangsta / og_tags.liquid
Created February 10, 2016 01:16
og_tags.liquid
{% if template contains 'sales_page' %}
<meta property="og:type" content="product">
<meta property="og:title" content="{{ sales_page.title | escape }}">
<meta property="og:description" content="{{ sales_page.body | strip_html | escape | truncate: 300 }}">
{% if sales_page.thumbnail_url %}
<meta property="og:image" content="{{ sales_page.thumbnail_url }}">
{% endif %}
{% elsif template contains 'blog_post' %}
<meta property="og:type" content="article">
<meta property="og:title" content="{{ blog_post.title }}">
@codegangsta
codegangsta / main.go
Created July 7, 2015 23:08
JSON and Middleware
package main
import (
"encoding/json"
"net/http"
"github.com/codegangsta/negroni"
"github.com/julienschmidt/httprouter"
)
package models
import (
"net/http"
"labix.org/v2/mgo"
)
type DB struct {
Database string
package main
import (
"flag"
"net/http"
"github.com/codegangsta/negroni"
)
func main() {
package main
import (
"github.com/bmizerany/mc"
"github.com/codegangsta/envy/lib"
"github.com/codegangsta/negroni"
"github.com/crowdmob/goamz/aws"
"github.com/crowdmob/goamz/s3"
"github.com/disintegration/imaging"
package util
import (
"crypto/rand"
"fmt"
)
type UUID [16]byte
// create a new uuid v4
package main
import (
"github.com/codegangsta/martini"
"github.com/codegangsta/martini-contrib/binding"
"github.com/codegangsta/martini-contrib/render"
"labix.org/v2/mgo"
)
type Wish struct {
package main
import (
"github.com/codegangsta/inject"
"reflect"
"testing"
)
func helloWorld(val string) {
i := 0