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 startD = new Date("April 7, 2015")/3600; | |
var currD = new Date()/3600; | |
var diffD = Math.abs(currD - startD); | |
var time = Math.ceil(diffD)+10000; | |
var clock = $('.flip-counter').FlipClock(time, { | |
clockFace: 'Counter' | |
}); | |
setTimeout(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
$('body :not(script,sup)').contents().filter(function() { | |
return this.nodeType === 3; | |
}).replaceWith(function() { | |
return this.nodeValue.replace(/[™®©]/g, '$&'); | |
}); |
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
/* Directive for Hitting Enter for Search */ | |
function ngEnter() { | |
return function (scope, element, attrs) { | |
element.bind("keydown keypress", function (event) { | |
if (event.which === 13) { | |
scope.$apply(function () { | |
scope.$eval(attrs.ngEnter); | |
}); | |
event.preventDefault(); | |
} |
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
Array.prototype.findDupes = function () { | |
return this.reduce(function (accum, current) { | |
if (angular.lowercase(accum).indexOf( | |
angular.lowercase(current)) < 0) { | |
accum.push(angular.lowercase(current)); | |
} | |
return accum; | |
}, []); | |
}; |
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
<small> | |
©<span id="copyright"></span> Some Company, LLC | |
</small> | |
<script> | |
(function () { | |
const startYear = 2017, | |
currYear = new Date().getFullYear(); | |
const year = currYear > startYear ? | |
`${startYear}-${currYear}` : startYear; |
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
<html> | |
<head> | |
<title>Convert Time from Argentine Time to Local Time</title> | |
</head> | |
<body> | |
<span id="time"></span> | |
<script> | |
function toLocalTime(time) { | |
var splitTime = time.split(':'); | |
var currDate = new Date(); |
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
... | |
/** | |
** Disables RSS for staging | |
**/ | |
function disable_rss() { | |
return null; | |
} | |
if($_SERVER["HTTP_HOST"] == "[staging server address]"){ | |
add_filter('default_feed', 'disable_rss'); | |
} |
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 myArr = [], | |
count = 0, | |
batches = 0, | |
newArr = []; | |
for (var i = 0; i < 103; i++) { | |
myArr.push(i); | |
if (myArr.length > 9) { | |
batches = Math.ceil(myArr.length / 10); | |
} |
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 a = ["a","a","b","c","c"]; | |
var dupes = a.filter((value,index,self)=>{ return (self.indexOf(value) !== index )}); | |
var cleanArray = a.filter((value,index,self)=>{ return (self.indexOf(value) === index )}); | |
console.log(dupes); | |
console.log(cleanArray); |
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 center-justified { | |
text-align-last: center; | |
text-align: justify; | |
} | |
@mixin left-justified { | |
text-align-last: left; | |
text-align: justify; | |
} | |
@mixin right-justified { | |
text-align-last: right; |
OlderNewer