Skip to content

Instantly share code, notes, and snippets.

View carcus88's full-sized avatar

Mark Mitchell carcus88

View GitHub Profile
@carcus88
carcus88 / validDate.js
Created January 25, 2017 22:11
validate a date string in javascript
function isValidDate(date) {
var parts = date.split('/');
var month = parts[0];
var day = parts[1];
var year = parts [2];
year = Number(year);
month = Number(month);
day = Number(day)
var d = new Date(date);
if (d.getFullYear() != year
@carcus88
carcus88 / debug.txt
Created October 2, 2014 05:48
Vagrant debug
INFO global: Vagrant version: 1.6.5
INFO global: Ruby version: 2.0.0
INFO global: RubyGems version: 2.0.14
INFO global: VAGRANT_DEFAULT_PROVIDER="parallels"
INFO global: VAGRANT_EXECUTABLE="/Applications/Vagrant/bin/../embedded/gems/gems/vagrant-1.6.5/bin/vagrant"
INFO global: VAGRANT_INSTALLER_EMBEDDED_DIR="/Applications/Vagrant/bin/../embedded"
INFO global: VAGRANT_INSTALLER_VERSION="2"
INFO global: VAGRANT_DETECTED_OS="Darwin"
INFO global: VAGRANT_INSTALLER_ENV="1"
INFO global: VAGRANT_INTERNAL_BUNDLERIZED="1"
@carcus88
carcus88 / broadfax_api.php
Created September 27, 2011 17:37
Broadfax API - A PHP class (cakePHP) for communicating with the BroadFax FAX server API.
<?php
/**
* PEAR HTTP Request class
*/
require_once('HTTP/Request.php');
/**
* PEAR XML Serializer/Unserializer required
*/
require_once('XML/Serializer.php');
require_once('XML/Unserializer.php');
@carcus88
carcus88 / cake_shell_generic.js
Created August 23, 2011 16:01
CakeShell - SOS JobScheduler CakeShell job for executing cakePHP shells
function spooler_process() {
try {
var commandline;
var parameters;
var subprocess = spooler_task.create_subprocess();
if (spooler_task.params.value("shell_command") != null && spooler_task.params.value("shell_command").length > 0) {
commandline = spooler_task.params.value("shell_command");
} else {
@carcus88
carcus88 / subscriber.get.inc.php
Created May 6, 2011 20:19
OemPro API - Subscriber.Get
<?php
// Check for required fields - Start
$ArrayRequiredFields = array('emailaddress' => 1, 'listid' => 2);
$ArrayErrorFields = FormHandler::RequiredFieldValidator($ArrayAPIData, $ArrayRequiredFields);
if (count($ArrayErrorFields) > 0)
{
$ArrayOutput = array('Success' => false,
'ErrorCode' => $ArrayErrorFields,
);
throw new Exception('');
@carcus88
carcus88 / TextboxList.Autocomplete.js
Created April 27, 2011 18:53
TextboxList Enhancements (clear function, drop down list to show all items)
/*
Script: TextboxList.Autocomplete.js
TextboxList Autocomplete plugin
Authors:
Guillermo Rauch
Note:
TextboxList is not priceless for commercial use. See <http://devthought.com/projects/jquery/textboxlist/>
Purchase to remove this message.
@carcus88
carcus88 / api.php
Created April 19, 2011 13:30
OemPro API - Subscribers.Update
<?php
/**
* @author Cem Hurturk
* @copyright Octeth.com
**/
/**
* API Module. Contains all functions and procedures.
**/