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
#!/bin/bash | |
# | |
# This script configures WordPress file permissions based on recommendations | |
# from http://codex.wordpress.org/Hardening_WordPress#File_permissions | |
# | |
# Author: Michael Conigliaro | |
# | |
WP_OWNER=changeme # <-- wordpress owner | |
WP_GROUP=changeme # <-- wordpress group | |
WP_ROOT=/home/changeme # <-- wordpress root directory |
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
/** | |
* | |
* $color1 - hexdecimal color 1 without the hash at the beginning e.g. ffffff | |
* $color2 - hexdecimal color 1 without the hash at the beginning e.g. 000000 | |
* $ratio - ration between the two colors as a fraction of 1 e.g. for 65% use 0.65 | |
* | |
**/ | |
function mix_colors_blend($color1, $color2, $ratio = 0.5) { | |
$color1_red = hexdec(substr($color1, 0, 2)); |
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 setContainerHeightToPage(container, heightFromTop) | |
{ | |
var gridHeight = jQuery(window).height() + jQuery(document).scrollTop() - heightFromTop; | |
$(container).css('height', gridHeight + 'px'); | |
} | |
function intializeSetContainerHeightToPage( container, heightFromTop) | |
{ | |
setContainerHeightToPage( container, heightFromTop); |
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 successFunction() { | |
console.log('begin nike button'); | |
} | |
function failFunction() { | |
console.log('shit hit the fan'); | |
} | |
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 setTimedOutInterval(totalTime, intervalTime, callBackFunction) { | |
var noOfLoops = totalTime / intervalTime, | |
counter = 0; | |
intervalId = setInterval(function () { | |
console.log('check'); | |
console.log(counter); | |
if (counter <= noOfLoops) { | |
counter++; | |
} else { | |
clearInterval(intervalId); |
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 setTimedOutInterval(totalTime, intervalTime, callBackFunction) { | |
intervalId = setInterval(function () { | |
console.log('check B'); | |
if (finished === true) { | |
console.log('B finished = true'); | |
clearInterval(intervalId); | |
callBackFunction(); | |
} | |
}, intervalTime); |
NewerOlder