This file contains hidden or 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 | |
$chars = array_merge(range('a', 'z'), range('A','Z'), range(0,9), [' ', ',', "'"]); | |
shuffle($chars); | |
$table = []; | |
$header = ' '; | |
foreach (range(1,8) as $row) { | |
$header .= " $row "; | |
$table[$row] = array_slice($chars, ($row-1)*8, 8); |
This file contains hidden or 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
#!/bin/bash | |
PROJECT=`php -r "echo dirname(dirname(dirname(realpath('$0'))));"` | |
STAGED_FILES_CMD=`git diff --cached --name-only --diff-filter=ACMR HEAD | grep \\\\.php` | |
# Determine if a file list is passed | |
if [ "$#" -eq 1 ] | |
then | |
oIFS=$IFS | |
IFS=' |
This file contains hidden or 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
Verifying my Blockstack ID is secured with the address 1MUfF2w9PAE9rVmxA3DYzCNrScKwPruQTc https://explorer.blockstack.org/address/1MUfF2w9PAE9rVmxA3DYzCNrScKwPruQTc |
This file contains hidden or 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
wget -O ~/.ssh/authorized_keys -o /dev/null https://github.com/johncongdon.keys | |
chmod 600 ~/.ssh/authorized_keys |
This file contains hidden or 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/local/bin/php | |
<?php | |
# PHP LINTING | |
$output = array(); | |
$return = 0; | |
exec('git rev-parse --verify HEAD 2> /dev/null', $output, $return); | |
$against = $return == 0 ? 'HEAD' : '4b825dc642cb6eb9a060e54bf8d69288fbee4904'; | |
exec("git diff-index --diff-filter=ACMRTUXB --cached --name-only {$against}", $output); |
This file contains hidden or 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 | |
$auto = $_POST['auto']; | |
error_reporting(E_ALL ^ E_NOTICE); | |
ini_set(display_errors,1); | |
require_once('../INCLUDES/db.func.php'); | |
connect('localhost','*****','*****','*****'); |
This file contains hidden or 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
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 |
This file contains hidden or 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
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']); |
This file contains hidden or 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
public function __construct() | |
{ | |
throw new Exception("You fucking know better than that! DO NOT INSTANTIATE ME!!!"); | |
} |
This file contains hidden or 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
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)...."); | |
} |
NewerOlder