This file contains hidden or 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
<cfcomponent> | |
<cffunction name="csvToQuery"> | |
<cfargument name="data" default=""> | |
<cfargument name="cols" default=""> | |
<cfargument name="delimiter" default=","> | |
<cfscript> | |
This file contains hidden or 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
<cfcomponent> | |
<!--- | |
Function Name : linuxDateTime() | |
Author : Ryan Spencer | |
Created : 26/09/2008 | |
General Notes : Returns the date from a Epoch Time format of seconds | |
since UTC January 1, 1970, 00:00:00 (Epoch time). | |
This file contains hidden or 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 Name : numberToLetter() | |
Author : Ryan Spencer | |
Created : 22/05/2012 | |
General Notes : convert a number into a letter similar to how excell columns work. | |
Function in : | |
number (int) | |
This file contains hidden or 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 Name : validateUUID() | |
Author : Ryan Spencer | |
Created : 13/02/2009 | |
General Notes : | |
Function in : | |
uuid | string | |
This file contains hidden or 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
for ( int i = 0; i < 5; i++ ) | |
{ | |
UIView *subview = [[UIView alloc] initWithFrame:CGRectMake(0, 44 * i, self.view.frame.size.width, 44)]; | |
// this is where the magic is done. Check to see if the number is dividable by 2 (modulo) | |
if ( i % 2 == 1 ) | |
{ | |
subview.backgroundColor = [UIColor blackColor]; | |
} |
This file contains hidden or 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
// accepts 1 parameter which is passed straight through to php file for determining which tracking code to display | |
function fireConversionCode( code ) | |
{ | |
// check to see if iframe is already created. We only want to create one iframe on the page, but can load multiple pixels | |
if ( $('#trackingFrame').length == 0 ) | |
{ | |
// create empty iframe | |
var iframe = $('<iframe id="trackingFrame" width="0" height="0">').css({"width":"0px","height":"0px"}); | |
// append to end of document |
This file contains hidden or 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 | |
for EVENT_HOOK in $(cd /location/wordpress/ && /usr/local/bin/wp cron event list --format=csv --fields=hook,next_run_relative | grep now | awk -F ',' '{print $1}') | |
do | |
/usr/local/bin/wp cron event run $EVENT_HOOK | |
done |