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
import { Pipe, PipeTransform } from '@angular/core'; | |
// Epochs | |
const epochs: any = [ | |
['year', 31536000], | |
['month', 2592000], | |
['day', 86400], | |
['hour', 3600], | |
['minute', 60], | |
['second', 1] |
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
/*! | |
* Froala Line Height plugin | |
* froala_editor v2.7.1 (https://www.froala.com/wysiwyg-editor) | |
*/ | |
!function (a) { | |
"function" == typeof define && define.amd ? define(["jquery"], a) : "object" == typeof module && module.exports ? module.exports = function (b, c) { | |
return void 0 === c && (c = "undefined" != typeof window ? require("jquery") : require("jquery")(b)), a(c), c | |
} : a(jQuery) | |
}(function (a) { |
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
curl -o lightsail-compose.sh https://raw.githubusercontent.com/JonCatmull/docker/master/lightsail-compose.sh | |
chmod +x ./lightsail-compose.sh | |
./lightsail-compose.sh |
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
import { Pipe, PipeTransform } from '@angular/core'; | |
import { DatePipe } from '@angular/common'; | |
import { RelativeDatePipe } from './relative-date.pipe'; // https://gist.github.com/JonCatmull/e00afb1c96298a4e386ea1b5d091702a | |
const secondsInAday = 86400; | |
/* | |
* Turn Date into realtive date (e.g. "5 days ago") unless date is | |
* more than relativeMax days ago. |
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
@mixin responsive-sprite($img, $icon-classes, $horizontal: true) { | |
$icon-number: ceil(length($icon-classes)); | |
$moveby: 100% / ($icon-number - 1); // one less that actual amount | |
background-image: url('#{$img}'); | |
background-position: 0 0; | |
background-repeat: no-repeat; | |
@if $horizontal { |
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 kkeys = [], konami = "38,38,40,40,37,39,37,39,66,65"; | |
$(document).keydown(function(e) { | |
kkeys.push( e.keyCode ); | |
if ( kkeys.toString().indexOf( konami ) >= 0 ) { | |
$(document).unbind('keydown',arguments.callee); |
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() { | |
'use strict'; | |
angular | |
.module('fcp') | |
.directive('pagination', pagination); | |
/** @ngInject */ | |
function pagination() { | |
var directive = { |
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() { | |
'use strict'; | |
angular | |
.module('fcp') | |
.filter('itemFirst', itemFirst); | |
/** @ngInject */ | |
function itemFirst($filter) { |
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
/** | |
* | |
* Google Map | |
*------------------------------------- | |
*/ | |
$('.googleMap').each(function() { | |
var $map = $(this), | |
lat = ($map.attr('data-lat') ? parseFloat($map.data('lat')) : 0), | |
lng = ($map.attr('data-lng') ? parseFloat($map.data('lng')) : 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
var ExampleObject = function() | |
{ | |
var privateStaticMethod = function() {}; | |
var privateStaticVariable = "foo"; | |
var constructor = function ExampleObject(foo, bar) | |
{ | |
var = privateProperty = foo; | |
this.publicProperty = bar; |