Skip to content

Instantly share code, notes, and snippets.

View seyDoggy's full-sized avatar

Adam Merrifield seyDoggy

View GitHub Profile
@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 / 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 / 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 / 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 / responsive-sticky-footer.css
Last active November 30, 2017 03:04
Responsive sticky footer for bootstrap
@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 / let g:ctrlp_custom_ignore
Created December 3, 2014 14:02
Getting around spf13-vim's ctrlp_user_command in order to set ctrlp_custom_ignore
" The custom ignore feature in ctrlp.vim is a useful feature
" when you want to ignore files and folder in your directory
" structure. However if yo set g:ctrlp_user_command then
" g:ctrlp_custom_ignore had no effect. This is all well and
" and good unless you use a vim distribution like spf13-vim
" that just so happens to set g:ctrlp_user_command. So here
" is how you get around that issue in your own .vimrc.local:
"
" unlet the original spf13-vim settings
unlet g:ctrlp_custom_ignore
@seyDoggy
seyDoggy / tab-mappings.vim
Created November 25, 2014 15:03
My ternary operator for mapping the tab key to the appropriate plugin.
" <tab> mapping
imap <expr><TAB>
\ neosnippet#expandable_or_jumpable() ? "\<Plug>(neosnippet_expand_or_jump)" :
\ emmet#isExpandable() ? emmet#expandAbbrIntelligent("\<tab>") :
\ pumvisible() ? "\<C-n>" :
\ "\<TAB>"
smap <expr><TAB>
\ neosnippet#expandable_or_jumpable() ? "\<Plug>(neosnippet_expand_or_jump)" :
\ emmet#isExpandable() ? emmet#expandAbbrIntelligent("\<tab>") :
\ "\<TAB>"
// Bootstrap Mid-Small - col-ms-* - the missing grid set for Bootstrap3.
//
// LICENSE under MIT - https://github.com/twbs/bootstrap/blob/master/LICENSE
//
// Source: https://gist.github.com/seyDoggy/4f370a676f5db6df2d1d
// Forked: https://gist.github.com/andyl/6360906
//
// This is a hack to fill the gap between 480 and 760 pixels - a missing range
// in the bootstrap responsive grid structure. Use these classes to style pages
// on cellphones when they transition from portrait to landscape.
/*==================================================
= Bootstrap 3 Media Queries =
==================================================*/
/*========== Mobile First Method ==========*/
/* Custom, iPhone Retina */
@media only screen and (min-width : 320px) {
}