This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Is there a way to change a path for a specific module during the r.js build process? | |
// So that a module with a dependency of 'jquery' can be used with two versions? | |
// I have tried to show what I would be after with lines 16-18 | |
({ | |
baseUrl: "./", | |
paths: { | |
"jquery": "jquery/jquery-2.0" | |
}, | |
modules: [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ---- | |
// Sass (v3.3.0.rc.5) | |
// Compass (v1.0.0.alpha.18) | |
// ---- | |
// **** | |
// TOGGLE THIS VARIABLE TO SEE THE DIFFERENCE | |
$is-ie: false | |
@mixin respond-to($screen-width) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ---- | |
// Sass (v3.3.0.rc.1) | |
// Compass (v0.13.alpha.10) | |
// ---- | |
$is-ie: true | |
@mixin respond-at($screen-width) | |
@if $is-ie == false | |
@media only screen and (min-width : #{$screen-width}px) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Really this is just a proximity_sensor, it will fire whatever event you pass as an arg | |
# It has nothing to do with loading, that's just how we've used it so far | |
required = if window.lp.isMobile then 'jsmin' else 'jquery' | |
define [required, 'lib/extends/events'], ($, EventEmitter) -> | |
class ProximityLoader | |
for key, value of EventEmitter |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// When I specify our baseUrl as '/public/assets/javascripts' | |
// | |
// Grunt will fail to import any files from here ('public/assets/javascripts/lib/**/*.js') into the require call, presumably becaus it is searching in ./lib/**/ which doesn't exist. | |
// Obviously the specs won't run because there are no src files to test against | |
jasmine: { | |
avocado: { | |
src: ['lib/**/*.js'], | |
options: { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Jasmine Spec Runner</title> | |
<link rel="stylesheet" type="text/css" href=".grunt/grunt-contrib-jasmine/jasmine.css"> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
div{ | |
display:inline-block; | |
padding:5px; | |
margin:10px; | |
border:1px solid #ccc; | |
transition: 0s background-color; | |
} | |
div:hover{ | |
background-color:red; | |
transition-delay:1s; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function couldBePalindromic(word) { | |
let letters = word.split(''); | |
let matches = letters.map(letter => { | |
// How many sets of characters are multiples of 2 | |
return letters.filter((l) => l == letter).length % 2 == 0 | |
}) | |
// Filter out the ones that aren't | |
.filter((bool) => bool == true) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
var co = require('co'), | |
fs = require('co-fs'), | |
each = require('co-each'); | |
var dive = function* (path) { | |
var items = yield fs.readdir(path); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This is a utility function that breaks a URL into an object | |
// parseUri 1.2.2 | |
// (c) Steven Levithan <stevenlevithan.com> | |
// MIT License | |
function parseUri(d){for(var a=parseUri.options,d=a.parser[a.strictMode?"strict":"loose"].exec(d),c={},b=14;b--;)c[a.key[b]]=d[b]||"";c[a.q.name]={};c[a.key[12]].replace(a.q.parser,function(d,b,e){b&&(c[a.q.name][b]=e)});return c} | |
parseUri.options={strictMode:!1,key:"source protocol authority userInfo user password host port relative path directory file query anchor".split(" "),q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}}; | |
function getCampaignMedium(landinguri, campcode, refuri){ | |
/**********Campaign managem |