Skip to content

Instantly share code, notes, and snippets.

View seyDoggy's full-sized avatar

Adam Merrifield seyDoggy

View GitHub Profile
@seyDoggy
seyDoggy / unknownpattern.js
Created December 24, 2014 18:50
What is this pattern called?
(function (global, factory) {
factory(global.MyFunc = {});
}(this, function (myfunc) {
// private
var privVar = 'What\'s this pattern called?';
function privFunc (some, text) {
return some + text;
}
// public
@seyDoggy
seyDoggy / responsive-sticky-footer.css
Last active November 30, 2017 03:04
Responsive sticky footer for bootstrap
@seyDoggy
seyDoggy / recursive-promise.js
Created January 13, 2015 23:38
Anyone see any promise anti patterns?
// assumed returned method of tokenService, a factory in my angular app.
function validate() {
var expires = new Date(sessionStore.get(XPERATION)),
now = new Date(),
deferred = $q.defer();
try {
if (sessionStore.get(XPERATION)) {
if (Object.prototype.toString.call(expires) === '[object Date]' && !isNaN(expires.getTime())) {
@seyDoggy
seyDoggy / SomeCtrl.js
Last active March 4, 2022 16:54
My version of the AngularJS ui-bootstrap alert service as derived from here: https://coderwall.com/p/r_bvhg/angular-ui-bootstrap-alert-service-for-angular-js. No $rootScopes were harmed in the making of this code.
(function () {
'use strict';
angular.module('myApp')
.controller('SomeCtrl', SomeCtrl);
SomeCtrl.$inject = ['$scope', '$http', ' alertService'];
function SomeCtrl($scope, $http, alertService) {
$http.put('http://some.url/user/44', {
@seyDoggy
seyDoggy / places.json
Created January 18, 2015 21:00
sample data returned from places
{
"html_attributions" : [],
"result" : {
"address_components" : [
{
"long_name" : "76",
"short_name" : "76",
"types" : [ "street_number" ]
},
{
@seyDoggy
seyDoggy / the.css
Last active August 29, 2015 14:15 — forked from suzck/the.css
Font Awesome over rides for radio buttons and checkbox's
/* So first step is to hide your actual radio button because the browser won't let you hide the real thing */
input[type="radio"], input[type="checkbox"] {
display:none;
}
/* Next specify a font size, 8px is comes out about the same size as a regular radio button */
.radio-stack{
font-size: 8px;
}
@seyDoggy
seyDoggy / caller.js
Last active August 29, 2015 14:16 — forked from raygig/gist:2aa37249bd33f916321a
Ray's work on iframe popup resizing.
try {
parent.FF.popup.resize(document);
} catch(e) {}
@seyDoggy
seyDoggy / basic.html
Created March 26, 2015 14:03
Zurb Ink basic email template
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width"/>
<style>
/**********************************************
* Ink v1.0.5 - Copyright 2013 ZURB Inc *
**********************************************/

Keybase proof

I hereby claim:

  • I am seyDoggy on github.
  • I am seydoggy (https://keybase.io/seydoggy) on keybase.
  • I have a public key whose fingerprint is 9E1D 2DEB 564D CFA0 E077 36AF 85E5 BC97 30D9 884B

To claim this, I am signing this object:

@seyDoggy
seyDoggy / git-release-notes.sh
Last active November 3, 2015 14:53
Use git log to grab a quick summary of what's changed between versions.
git log --pretty=format:"- %s%n%n %b" --no-merges v3.0.5.1..v3.1.0