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
var tailHeaders = $('.tail-header'); | |
for(var i = 0; i < tailHeaders.length; i++) { | |
new Waypoint.Sticky({ | |
element: tailHeaders[i], | |
context: $('#container'), | |
handler: function(direction) { | |
var prevTailHeader = this.waypoint.previous() ? this.waypoint.previous().adapter.$element : null; | |
var nextTailHeader = this.waypoint.next() ? this.waypoint.next().adapter.$element : null; |
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 Emmet snippet --> | |
.tail*20>div>.tail-header{Tail Header $$}+(p>lorem)+(p>lorem) | |
<!-- Generates this expansion --> | |
<div class="tail"> | |
<div> | |
<div class="tail-header">Stuff</div> | |
<p>Aperiam commodi dolore dolorum eligendi esse et ex expedita magni, modi nam odio placeat sit temporibus | |
totam voluptatem. Ab adipisci deleniti dicta esse, explicabo hic neque omnis quae reiciendis sit. |
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
angular.module('dep2', []) | |
.factory('ServiceTwo', function($q, $timeout){ | |
var timeStamp; | |
return { | |
getTimeStamp: function(){ | |
var defer = $q.defer(); | |
if(typeof timeStamp === 'undefined'){ | |
$timeout(function(){ |
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
<script> | |
angular.module('main', ['dep1', 'dep2']) | |
.controller('Controller1', function($scope, ServiceOne, ServiceThree){ | |
$scope.fromService = ServiceOne.publicStuff; | |
ServiceThree.getServiceThreeData().then(function(data) { | |
$scope.fromServiceThree = data; | |
}); | |
}) |
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
var gulp = require('gulp'); | |
function startExpress() { | |
var express = require('express'); | |
var app = express(); | |
app.use(require('connect-livereload')()); | |
app.use(express.static(__dirname)); | |
app.listen(8080); | |
} |
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
<script> | |
angular.module('main', ['ui.router']) | |
.config(function($stateProvider, $urlRouterProvider) { | |
$stateProvider | |
.state('home', { | |
url: '/home', | |
resolve: { | |
filterData: function(){ | |
return [1, 2, 3, 4, 5, 6] | |
}, |
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
module.exports = function(config) { | |
config.set({ | |
// base path that will be used to resolve all patterns (eg. files, exclude) | |
basePath: '', | |
// frameworks to use | |
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter | |
frameworks: ['jasmine'], |
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 lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Waypoints Elements Different Heights</title> | |
<style> | |
html, body { | |
height: 100%; | |
margin: 0; |
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{Number $@20}*5 |
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 lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Waypoints Elements Different Heights</title> | |
<style> | |
html, body { | |
height: 100%; | |
margin: 0; |