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
(function($app, $jQuery) { | |
"use strict"; | |
var CampaignGroupCollection = function(options) { | |
this.init(options); | |
}; | |
CampaignGroupCollection.prototype.init = function(options) { | |
this.collection = options.collection; | |
this.campaignGroups = []; |
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 | |
// This fails, but only on staging (DigitalOcean) server. | |
// Works fine on production (Linode) server. | |
// Please ignore bad security practices. | |
$curl = curl_init(); | |
curl_setopt($curl, CURLOPT_URL, 'https://server.com:2143'); | |
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0); | |
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'POST'); | |
curl_setopt($curl, CURLOPT_POSTFIELDS, '<CommandQuery/>'); |
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
paths: | |
migrations: %%PHINX_CONFIG_DIR%%/../migrations | |
environments: | |
default_migration_table: _migrations | |
default_database: test | |
prod: | |
adapter: pgsql | |
host: "@@DB_SETTINGS_HOST@@" | |
name: "@@DB_SETTINGS_DATABASE@@" |
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 | |
class Histogram | |
{ | |
/** @var array */ | |
private $buckets = []; | |
/** @var integer */ | |
private $count = 0; |
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
Neat! I posted a link to my s3backup utility to HackerNews at the announcement that codinghorror.com had lost everything. I pointed how simple it was to use my utility (or any of them) to quickly and easily backup your databases and files. | |
Using s3backup, you can tar up your entire vhosts directory, or push each database dump to s3. It's insanely cheap. You can store 30gb, upload 30gb and download 30gb a month for $10. And chances are, you won't be downloading anything, so its even less than that. | |
s3backup also requires that the database is encrypted before it will work, so you have to have gpg installed. | |
Also, ensure that the files you're pushing are marked private. This ensures they can't be publicly downloaded. | |
I noticed I had some followers now, which is pretty neat. It also opens me up to scrutiny, but thats great, it'll only make my software better. |
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
#!/usr/bin/perl -w | |
use strict; | |
my $found_error = 0; | |
sub msg { | |
my $msg = shift @_; | |
print $msg . "\n"; | |
} |
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
<?xml version="1.0"?> | |
<project name="IONCart" description="Advanced Shopping Cart" default="build" > | |
<target name="clean"> | |
<delete file="./lib/configure.php" /> | |
</target> | |
<target name="githooks"> | |
<exec command="ln -s ../../hooks/pre-commit" dir=".git/hooks" /> | |
</target> |
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 'Artisan/Db.php'; | |
require_once 'Artisan/Exception.php'; | |
$db_config = array( | |
'server' => 'localhost', | |
'username' => 'username', | |
'password' => 'password', | |
'database' => 'dbname' |
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 'Artisan/Db.php'; | |
require_once 'Artisan/Exception.php'; | |
$db_config = array( | |
'server' => 'localhost', | |
'username' => 'username', | |
'password' => 'password', | |
'database' => 'dbname' |
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 'Artisan/Db.php'; | |
require_once 'Artisan/Exception.php'; | |
$db_config = array( | |
'server' => 'localhost', | |
'username' => 'username', | |
'password' => 'password', | |
'database' => 'dbname' |
OlderNewer