start new:
tmux
start new with session name:
tmux new -s myname
function setTimedOutInterval(totalTime, intervalTime, callBackFunction) { | |
intervalId = setInterval(function () { | |
console.log('check B'); | |
if (finished === true) { | |
console.log('B finished = true'); | |
clearInterval(intervalId); | |
callBackFunction(); | |
} | |
}, intervalTime); |
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); |
function successFunction() { | |
console.log('begin nike button'); | |
} | |
function failFunction() { | |
console.log('shit hit the fan'); | |
} | |
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); |
/** | |
* | |
* $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)); |
#!/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 |
displacementFromMiddle = function(index, arraySize, middleIndex) { | |
if (index == middleIndex) return 0; | |
var imagesRadius = Math.floor(arraySize / 2) | |
var x = index - middleIndex; | |
var y; | |
if (x > imagesRadius) { | |
y = x - arraySize; |
user nginx; | |
worker_processes 1; | |
events { worker_connections 1024; } | |
http { | |
sendfile on; |
user nginx; | |
worker_processes 1; | |
events { worker_connections 1024; } | |
http { | |
sendfile on; |