Skip to content

Instantly share code, notes, and snippets.

View reedling78's full-sized avatar

Reed Rizzo reedling78

  • Monotype Imaging
View GitHub Profile
@reedling78
reedling78 / AMD: Polyfills.js
Last active August 29, 2015 13:55
Polyfills
(function() {
'use strict';
define([], function() {
return {
consolelog: function() {
var alertFallback = true;
if (typeof console === "undefined" || typeof console.log === "undefined") {
console = {};
if (alertFallback) {
console.log = function(msg) {
(function() {
'use strict';
define([], function() {
return {
browserDetect: function() {
var returnVal = 'NOT IE';
var bName = window.navigator.userAgent;
var bVersion = window.navigator.appVersion;
if (bVersion.indexOf("MSIE 7.0") >= 1 || bVersion.indexOf("msie 7.0") >= 1) {
@reedling78
reedling78 / Boilerplate: Bootstrap
Created February 1, 2014 20:26
Boilerplate: Bootstrap
<!DOCTYPE html>
<html>
<head>
<title>Bootstrap Boilerplate</title>
<link href="http://netdna.bootstrapcdn.com/bootstrap/3.1.0/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
whatever
<script src="http://netdna.bootstrapcdn.com/bootstrap/3.1.0/js/bootstrap.min.js"></script>
</body>
@reedling78
reedling78 / Boilerplate: SEO
Created February 1, 2014 20:40
Boilerplate: SEO
<html>
<head>
<title>Site Title</title>
<meta name="description" content="Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.">
<meta name="keywords" content="Keywords Tag - It can help but not hurt. Place 5-10 accurate, unique keywords in this tag for your page. Be sure that they match the actual page content.">
<meta property="og:title" content="The Rock" />
<meta property="og:type" content="video.movie" />
@reedling78
reedling78 / JS: AMD
Last active February 27, 2016 21:11
JS: AMD
/*jslint nomen: true*/
/*globals window, document, define, $, _, console, alert*/
define([], function () {
'use strict';
console.log('whatever');
});
@reedling78
reedling78 / JS: Backbone View
Created February 11, 2014 23:36
JS: Backbone View
Backbone.View.extend({
el: $('body'),
initialize: function () {
console.log('View Initialized');
},
events : {
'click button': 'something'
@reedling78
reedling78 / Weld Module
Created May 15, 2014 14:35
Weld Module
define(
['services/jquery'],
function ($) {
return {
creator: function (sandbox) {
var $sandboxOption1 = $(sandbox.getOption('optionOne')),
$sandboxOption2 = $(sandbox.getOption('optionTwo')),
$sandboxOption3 = $(sandbox.getOption('optionThree'));
var nameSpace = {
@reedling78
reedling78 / Test
Last active August 29, 2015 14:14
Test
define([], function() {
'use strict';
console.log('whatever 1 ');
});
@reedling78
reedling78 / gist:0b52537fb206868e1843
Created March 19, 2015 16:00
C# Thousands Separator
using System;
public class Program
{
public static void Main()
{
var number = 149872389041;
Console.WriteLine(number.ToString("#,0"));
}
}
@reedling78
reedling78 / Backbone AMD
Last active August 29, 2015 14:27
Backboneview AMD
/*globals window, document, define, $, Backbone, console, Modernizr, Fonts, alert*/
define([], function () {
'use strict';
Backbone.View.extend({
el: $('body'),
initialize: function () {
console.log('View Initialized');