Skip to content

Instantly share code, notes, and snippets.

<?php
return [
'minutes' => '/^(?:(?:[1-5]{0,1}[0-9]{1}(?:,[1-5]{0,1}[0-9]{1})*)|\*{1})$/',
'hours' => '/^(?:(?:[1-2]{0,1}[0-9]{1}(?:,[1-2]{0,1}[0-9]{1})*)|\*{1})$/',
'days' => '/^(?:[1-3]{0,1}[0-9](?:,[1-3]{0,1}[0-9])*|\*{1})$/',
'months' => '/^(?:(?:[1]{0,1}[0-9]{1}(?:,[1]{0,1}[0-9]{1})*)|\*{1})$/',
'weekdays' => '/^(?:[0-7](?:,[0-7]){0,6}|\*{1})$/',
'years' => '/^(?:(?:20[0-9]{2}(?:,20[0-9]{2})?)|\*{1})$/'
];
@paulrblakey
paulrblakey / gist:2c4439802cd510179f7b
Created June 17, 2014 15:40
Laravel php lint command ignoring vendors dirs
find . -path ./src/vendor -prune -o -name "*.php" -exec php -l {} \; | grep "Parse error"
#define DEBUG_CONSOLE
#define DEBUG_LEVEL_LOG
#define DEBUG_LEVEL_WARN
#define DEBUG_LEVEL_ERROR
#if (UNITY_EDITOR || DEVELOPMENT_BUILD)
#define DEBUG
#endif
#if (UNITY_IOS || UNITY_ANDROID)
<?php
/**
* DynamoDB Dump File Ingestion Script
* - takes a dynamodb dumpfile and breaks it down into individual records
* - splits each record back into its component parts in an array
* - returns it all
*
* Author : Paul Blakey.
* Date : 2/14/14
*
@paulrblakey
paulrblakey / Elasticsearch head request returns 403 on read_only index
Created September 16, 2013 13:46
Elasticsearch head request returns 403 on read_only index
## input some test data into an index
curl -X POST http://127.0.0.1:9200/testindex/testtype/1 -d'
{
"title":"titletest",
"description":"testdescription"
}'
## make a head request to the index
@paulrblakey
paulrblakey / AWS cleanup of known_hosts
Created May 3, 2012 17:33
Bash Shell script for cleaning up the known hosts in cases of aws pollution.
sed -e '/amazonaws/d' ~/.ssh/known_hosts > ~/.ssh/known_hosts2; mv ~/.ssh/known_hosts2 ~/.ssh/known_hosts;