Skip to content

Instantly share code, notes, and snippets.

View bbrewer97202's full-sized avatar

Ben Brewer bbrewer97202

View GitHub Profile
@bbrewer97202
bbrewer97202 / index.html
Created February 20, 2014 18:36
Simple Facebook,Twitter and Google+ social sharing calls
<!doctype html>
<html>
<head>
<title>Social share page title</title>
<meta name="description" content="Social share page description" />
<meta property="og:title" content="Social share og:title value" />
<meta property="og:description" content="Social share og:description value" />
<meta property="og:image" content = "http://www.thunderfarm.com/socialshare/socialshare.jpg" />
</head>
<body>
@bbrewer97202
bbrewer97202 / q.js-promises-chain.html
Last active August 29, 2015 14:08
Chained promises with q.js
<!doctype html>
<html>
<head>
<title></title>
<script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/q.js/1.0.1/q.min.js"></script>
</head>
<body>
<script type="text/javascript">
//watch browser console for notification of what is happening
@bbrewer97202
bbrewer97202 / webpack.config.js
Last active August 29, 2015 14:08
webpack jshint-loader custom reporter example with filename and color formatting
var chalk = require('chalk');
module.exports = {
module: {
preLoaders: [
{
test: /\.js$/,
exclude: /node_modules/,
loader: "jshint-loader"
}
@bbrewer97202
bbrewer97202 / child.html
Created January 7, 2015 00:37
Responsive Iframe demo
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<style type="text/css">
body, html {
@bbrewer97202
bbrewer97202 / Preferences.sublime-settings
Created October 29, 2015 17:32
Sample custom Sublime Text Settings
{
"always_show_minimap_viewport": true,
"caret_extra_width": 2,
"color_scheme": "Packages/User/SublimeLinter/Hyrule (SL).tmTheme",
"ensure_newline_at_eof_on_save": true,
"font_face": "Consolas",
"font_size": 15,
"highlight_line": true,
"highlight_modified_tabs": true,
"ignored_packages":
@bbrewer97202
bbrewer97202 / gist:5068302
Created March 1, 2013 22:09
Locked header + footer HTML page with two columns of scrolling content in between (tested iOS6 across orientation change).
<!doctype html>
<html>
<head>
<title></title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
</head>
<body>
<style type="text/css" media="screen">
html,body {
@bbrewer97202
bbrewer97202 / gist:5699204
Created June 3, 2013 16:03
cookie access via javascript starter
var cookie = {
//session cookies
setCookie: function(name, value) {
document.cookie = name + "=" + escape(value) + ';path=/';
},
getCookie: function(name) {
var key, val;
var cookies = document.cookie.split(";");
var cookiesLength = cookies.length;
for (var i=0; i < cookiesLength; i++) {
@bbrewer97202
bbrewer97202 / gist:6687433
Created September 24, 2013 16:34
Get Full URL of page in C# without query string
Response.Write(new Uri(HttpContext.Current.Request.Url.AbsoluteUri).GetLeftPart(UriPartial.Path));
@bbrewer97202
bbrewer97202 / index.html
Created October 7, 2013 19:00
angularjs select ng-option example with keys and values from object
<!doctype html>
<html ng-app="selectExample">
<head>
<title></title>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.8/angular.min.js"></script>
<script src="select.js" type="text/javascript"></script>
</head>
<body>
<div ng-controller="selectController">
@bbrewer97202
bbrewer97202 / index.html
Last active December 26, 2015 04:19
Icon font implementation with MSHPIconsRegular web font
<!doctype html>
<html>
<head>
<title>MSHPIconsRegular</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="//i.s-microsoft.com/fonts/segoe-ui/west-european/normal/latest.css" />
</head>
<body>
<style type="text/css">