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 | |
set_time_limit(0); | |
$fields = array( | |
'id', | |
'name', | |
'first_name', | |
'middle_name', | |
'last_name', |
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 | |
date_default_timezone_set('Europe/London'); | |
$dayInterval = new DateInterval('P1D'); | |
$startDate = new DateTime('2013-07-01'); | |
$duration = null; | |
if (isset($_GET['duration'])) { | |
$duration = $_GET['duration']; |
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 getUser($id) | |
{ | |
$user = new UserVO($this); | |
$user->findByID($id); | |
return $user; | |
} |
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 | |
/** | |
* An helper file for Laravel 4, to provide autocomplete information to your IDE | |
* Generated with https://github.com/barryvdh/laravel-ide-helper | |
* | |
* @author Barry vd. Heuvel <[email protected]> | |
*/ | |
exit('Only to be used as an helper for your IDE'); | |
class App extends Illuminate\Support\Facades\App{ |
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
sudo apt-get install python-software-properties | |
sudo add-apt-repository ppa:git-core/ppa | |
sudo apt-get update | |
sudo apt-get install git | |
sudo apt-get install libmysql-ruby libmysqlclient-dev |
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 | |
function remove_dir($dir) | |
{ | |
$files = array_diff(scandir($dir), array('.','..')); | |
foreach ($files as $file) { | |
(is_dir("$dir/$file")) ? remove_dir("$dir/$file") : unlink("$dir/$file"); | |
} |
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 | |
/* | |
* Plugin: StreamlineFoundation | |
* | |
* Class: Schedule | |
* | |
* Description: Provides scheduling mechanics including creating a schedule, testing if a specific moment is part of the schedule, moving back | |
* and forth between scheduled moments in time and translating the created schedule back to a human readable form. | |
* | |
* Usage: ::fromCronString() creates a new Schedule class and requires a string in the cron ('* * * * *', $language) format. |
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 | |
require dirname(__DIR__) . '/vendor/autoload.php'; | |
$chat = new \MyApp\Chat(); | |
$app = new \Ratchet\App(); | |
$app->route('/test', $chat); | |
$app->run(); |
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 | |
class Reader | |
{ | |
protected $fields = []; | |
protected $filters = []; | |
public function read($file) | |
{ | |
try { |
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
data = $('#form').serialize(); | |
$.ajax({ | |
type: "POST", | |
url: "send.php?"+data, |