Skip to content

Instantly share code, notes, and snippets.

View eightdotthree's full-sized avatar

Ryan Sprake eightdotthree

  • Forever.com
  • Pittsburgh
View GitHub Profile
@eightdotthree
eightdotthree / api.js
Last active December 14, 2015 03:00 — forked from atuttle/api.js
Angular.js REST API Service Wrapper
'use strict';
/**
* @ngdoc service
* @name destinyApp.API
* @description
* # API
*/
angular.module('destinyApp')
.factory('API', function ($http, $q, APIKEY, PLATFORMURL) {
@eightdotthree
eightdotthree / usemin.js
Created July 10, 2015 22:23
Usemin file for extracting attributes from CSS files. Used to maintain the data-skrollr-stylesheet attribute.
module.exports = function(grunt, options){
var yeoman = options.yeoman;
return {
options: {
dirs: [yeoman.dist],
blockReplacements: {
css: function(block) {
/**
* Find the first of the raw blocks that matches as a link, then extract the string to the left
* and the right of the href and put the new dest path in the middle of them, the keeping any
<!doctype html>
<html>
<head>
<title>White Plum Kitchen Sink - Bootstrap 3 Theme</title>
<meta name="viewport" content="width=device-width">
<link rel="stylesheet" href="../dist/css/bootstrap.css">
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js"></script>
<script type="text/javascript" src="https://netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>
<a href="#share" class="share">My custom sharing button</a>
<!-- Put the real addthis Share More link somewhere and hide it -->
<a class="addthis_button_compact display_none"></a>
@eightdotthree
eightdotthree / gist:f22a3e14d7e71ce5f016
Last active August 29, 2015 14:16
Populate email field from email param
/*
Function: getUrlParameters
Description: Get the value of URL parameters either from current URL or static URL
Author: Tirumal
URL: www.code-tricks.com
*/
getUrlParameters: function (parameter, staticURL, decode) {
var currLocation = (staticURL.length) ? staticURL : window.location.search,
parArr = currLocation.split('?')[1].split('&'),
@eightdotthree
eightdotthree / boostrap_mq
Last active August 29, 2015 14:06
SASS mixin for bootstrap media queries.
@mixin bootstrap_mq($point) {
@if $point == xs {
@media (min-width: $screen-xs-min) { @content }
}
@if $point == sm {
@media (min-width: $screen-sm-min) { @content }
}
@eightdotthree
eightdotthree / gist:2b3f60c44970eae84fd1
Created August 13, 2014 13:50
Gruntfile.js (Jekyll)
// Generated on 2014-08-10 using generator-jekyllrb 1.2.1
'use strict';
// Directory reference:
// css: css
// compass: sass
// javascript: js
// images: img
// fonts: fonts
@mixin bp($point) {
@if $point == print {
@media only print { @content; }
}
}
@mixin em_width($px) { width: #{$px / 16}em; }
@mixin em_maxwidth($px) { max-width: #{$px / 16}em; }