Open your .bashrc file and add the following:
gitup() {
git add .
git commit -m "$1"
git push -u origin master
}
alias gitup=gitup
<?php | |
// Obviously, you would build up the request somewhere other than a route... | |
Route::get('/api', function() | |
{ | |
$client = new \GuzzleHttp\Client(); | |
$response = $client->get('http://path/to/api'); |
$app->get('user/{id}', function($id) use ($app) { | |
return response() | |
->json([ | |
"name" => 'Billy', | |
'age' => '42' | |
]) | |
->header('Access-Control-Allow-Origin', '*'); | |
}); |
Open your .bashrc file and add the following:
gitup() {
git add .
git commit -m "$1"
git push -u origin master
}
alias gitup=gitup
<?php | |
require 'db.php'; | |
if (!empty($_POST)): | |
$data = array( | |
'firstname' => $_POST['firstname'], | |
'lastname' => $_POST['lastname'], | |
'email' => $_POST['email'] |
<?php | |
$path = '/var/www/repo'; | |
$status = 'Not Successful'; | |
if ( $_SERVER[ 'HTTP_X_GITHUB_EVENT' ] == 'push' || $_POST[ 'payload' ] ) | |
{ | |
shell_exec( 'cd ' . $path . ' && git reset --hard HEAD && git pull' ); | |
$status = 'Successful'; | |
} | |
?> |
<?php | |
class HTML { | |
public function __construct() { | |
} | |
public function doctype() { | |
return '<!DOCTYPE html>'; |
<?php | |
class CSS { | |
public function __construct() { | |
} | |
public function new($selector, $rules) { | |
$css = $selector.'{'; | |
foreach ($rules as $property => $value) { |