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
ANT000000 | Antiques & Collectibles / General | |
---|---|---|
ANT001000 | Antiques & Collectibles / Americana | |
ANT002000 | Antiques & Collectibles / Art | |
ANT003000 | Antiques & Collectibles / Autographs | |
ANT005000 | Antiques & Collectibles / Books | |
ANT006000 | Antiques & Collectibles / Bottles | |
ANT007000 | Antiques & Collectibles / Buttons & Pins | |
ANT008000 | Antiques & Collectibles / Care & Restoration | |
ANT009000 | Antiques & Collectibles / Transportation | |
ANT010000 | Antiques & Collectibles / Clocks & Watches |
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
<?php | |
// from http://www.if-not-true-then-false.com/2010/php-class-for-coloring-php-command-line-cli-scripts-output-php-output-colorizing-using-bash-shell-colors/ | |
class Colors { | |
private $foreground_colors = array(); | |
private $background_colors = array(); | |
public function __construct() { | |
// Set up shell colors | |
$this->foreground_colors['black'] = '0;30'; | |
$this->foreground_colors['dark_gray'] = '1;30'; |
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
<?php | |
function addOrdinalNumberSuffix($num) { | |
if (!in_array(($num % 100),array(11,12,13))){ | |
switch ($num % 10) { | |
// Handle 1st, 2nd, 3rd | |
case 1: return $num.'st'; | |
case 2: return $num.'nd'; | |
case 3: return $num.'rd'; | |
} | |
} |
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
DROP TABLE IF EXISTS `onix_code_list`; | |
CREATE TABLE `onix_code_list` ( | |
`list_id` int(11) unsigned NOT NULL, | |
`values` varchar(20) DEFAULT NULL, | |
`name` varchar(100) DEFAULT '', | |
`notes` text, | |
`revision` int(11) unsigned DEFAULT NULL, | |
KEY `list_id` (`list_id`) | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
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
# S3 Bucket | |
resource "aws_s3_bucket" "deployment" { | |
bucket = "${local.deployment_bucket}" | |
} | |
# Amazon Certificate Manager | |
resource "aws_acm_certificate" "cert" { | |
domain_name = "${local.domain}" | |
validation_method = "DNS" | |
} |
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
locals { | |
deployment_buckets = { | |
develop = "my-develop-bucket" | |
staging = "my-staging-bucket" | |
production = "my-production-bucket" | |
} | |
domains = { | |
develop = "develop.example.com" |
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
### Download setup Ubuntu 14.04 box | |
``` | |
// from local directory | |
vagrant init chef/ubuntu-14.04 | |
``` | |
### Setup Vagrantfile | |
``` | |
# -*- mode: ruby -*- | |
# vi: set ft=ruby : |
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
import boto3 | |
ec2 = boto3.client('ec2'); | |
cloudwatch = boto3.client('cloudwatch'); | |
def lambda_handler(event, context): | |
count = 0 | |
response = ec2.describe_instances() | |
for r in response['Reservations']: | |
count += len(r['Instances']) |
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
class SortMdArray { | |
public $sort_order = 'asc'; // default | |
public $sort_key = 'position'; // default | |
public function sortByKey(&$array) { | |
usort($array, array(__CLASS__, 'sortByKeyCallback')); | |
} | |
function sortByKeyCallback($a, $b) { | |
if($this->sort_order == 'asc') { |
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
<?php | |
require_once app_path().'/libraries/google-api-php-client/src/Google_Client.php'; | |
require_once app_path().'/libraries/google-api-php-client/src/contrib/Google_AnalyticsService.php'; | |
session_start(); | |
$client = new Google_Client(); | |
$client->setApplicationName("Google Analytics PHP Starter Application"); | |
// Visit https://code.google.com/apis/console?api=analytics to generate your |
NewerOlder