Skip to content

Instantly share code, notes, and snippets.

View ChristopherHackett's full-sized avatar

Christopher Hackett ChristopherHackett

View GitHub Profile
(function(){
var elem = document.createElement('script');
elem.src = "https://w.soundcloud.com/player/api.js";
elem.type = "text/javascript";
var scpt = document.getElementsByTagName('script')[0];
scpt.parentNode.insertBefore(elem,scpt);
}());
@ChristopherHackett
ChristopherHackett / Models_Entry.cs
Last active November 24, 2015 22:12
Example for SO 33845962
namespace Simple.Models
{
public class Entry
{
public int EntryID { get; set; }
public string SomeString { get; set; }
}
}
@ChristopherHackett
ChristopherHackett / 0_reuse_code.js
Created November 9, 2015 16:58
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@ChristopherHackett
ChristopherHackett / metabroadcast_example.json
Created November 6, 2015 18:10
metabroadcast example
{
"content": [
{
"id": "cjktz",
"type": "brand",
"media_type": "video",
"specialization": "tv",
"source": {
"key": "pressassociation.com",
"name": "PA",
<!doctype html>
<head>
<title>Test</title>
</head>
<body>
<h1>test<br>test<br>test<br></h1>
</body>
</html>
@ChristopherHackett
ChristopherHackett / index.html
Last active August 29, 2015 14:13
YouTube Play Event
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>YouTube Play Event</title>
<script>
// You will have a GTM dataLayer
var dataLayer = {};
</script>
</head>
@ChristopherHackett
ChristopherHackett / perfBar Bookmarklet
Last active August 29, 2015 14:05
perfBar Bookmarklet
javascript:(function(){var a="https://cdn.rawgit.com/lafikl/perfBar/v0.0.0/build/",b="",c=document.createElement("script");c.src=a+"perfbar.js"+b,document.body.appendChild(c);var checkExist=setInterval(function(){if(typeof perfBar=='object'){clearInterval(checkExist);perfBar.init({lazy:true});}},100);})();