I hereby claim:
- I am johncongdon on github.
- I am johncongdon (https://keybase.io/johncongdon) on keybase.
- I have a public key whose fingerprint is DFA0 91D5 A19F 1C10 4D4D 067C AD91 5449 071F 6AF3
To claim this, I am signing this object:
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
# Create Composer file and add MeetUp API PAckage | |
composer init --require="dms/meetup-api-client:~1.0" | |
# Install packages | |
composer install |
I hereby claim:
To claim this, I am signing this object:
protected function validateEventData($data) | |
{ | |
$days = (int)$data['pipeline_event_days']; | |
if ($data['pipeline_event_days'] != $days) | |
{ | |
throw new Exception('Invalid value for days'); | |
} | |
throw new Exception("....if ({$data['pipeline_event_days']} != $days)...."); | |
} |
public function __construct() | |
{ | |
throw new Exception("You fucking know better than that! DO NOT INSTANTIATE ME!!!"); | |
} |
14 public function __construct() | |
15 { | |
16 $config = Util_Config::getValue("memcache"); | |
17 if (isset($config['servers'])) | |
18 { | |
19 $memcache = new Memcached(); | |
20 print rand(1,9999999) . "<meta http-equiv=refresh content=2>"; | |
21 foreach ($config['servers'] as $server) | |
22 { | |
23 $memcache->addServer($server['host'], $server['port']); |
vagrant@homestead:~/Projects/DiegoDev/CrimeWorldMafia/api$ php artisan migrate:refresh | |
PHP Fatal error: Class 'CreateUserFinancesTable' not found in /home/vagrant/Projects/DiegoDev/CrimeWorldMafia/api/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php on line 297 | |
PHP Stack trace: | |
PHP 1. {main}() /home/vagrant/Projects/DiegoDev/CrimeWorldMafia/api/artisan:0 | |
PHP 2. Symfony\Component\Console\Application->run() /home/vagrant/Projects/DiegoDev/CrimeWorldMafia/api/artisan:59 | |
PHP 3. Symfony\Component\Console\Application->doRun() /home/vagrant/Projects/DiegoDev/CrimeWorldMafia/api/vendor/symfony/console/Symfony/Component/Console/Application.php:121 | |
PHP 4. Symfony\Component\Console\Application->doRunCommand() /home/vagrant/Projects/DiegoDev/CrimeWorldMafia/api/vendor/symfony/console/Symfony/Component/Console/Application.php:191 | |
PHP 5. Illuminate\Console\Command->run() /home/vagrant/Projects/DiegoDev/CrimeWorldMafia/api/vendor/symfony/console/Symfony/Component/Console/Application.php:88 |
<?php | |
/** | |
* Changed based on feedback from rdohms | |
*/ | |
$requiredFields = array( | |
'price', | |
'name', | |
'description', | |
'type', | |
'shippingCost', |
<?php | |
/* | |
* Set the current page name in a mysql variable | |
* | |
* This will be useful when the general_log is turned on and | |
* you want to drill down to a find out where these queries are running. | |
*/ | |
$page = mysql_real_escape_string($_SERVER['REQUEST_URI']); | |
mysql_query("SET @page='$page'"); |
/* Purpose: To have a Dependency Injected cache (we can change caching source easily) | |
* Question: Does throwing if not in cache make sense? This allows me to store FALSE as a value. | |
*/ | |
class blah { | |
public function removeCachedKey($key) { } | |
public function putIntoCache($key, $value, $expirationTime = 3600) | |
{ | |
$cache = self::$cache; | |
if ($cache && method_exists($cache, 'set')) { |