Skip to content

Instantly share code, notes, and snippets.

View ibourgeois's full-sized avatar
🎯
Focusing

Derek Bourgeois ibourgeois

🎯
Focusing
  • DevOption
  • Mebane, NC
  • 08:51 (UTC -04:00)
View GitHub Profile

Keybase proof

I hereby claim:

  • I am ibourgeois on github.
  • I am dbourgeois23 (https://keybase.io/dbourgeois23) on keybase.
  • I have a public key ASBaUkZiZsXVwMlJX77wrLoOHvQPpFmom3MeWRL1HTvxFgo

To claim this, I am signing this object:

@ibourgeois
ibourgeois / css.php
Created February 24, 2016 21:16
PHP CSS Class
<?php
class CSS {
public function __construct() {
}
public function new($selector, $rules) {
$css = $selector.'{';
foreach ($rules as $property => $value) {
@ibourgeois
ibourgeois / html.php
Created February 24, 2016 21:15
PHP HTML Class
<?php
class HTML {
public function __construct() {
}
public function doctype() {
return '<!DOCTYPE html>';
@ibourgeois
ibourgeois / deploy.php
Last active December 16, 2015 22:57
GitHub PHP Webhooks
<?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';
}
?>
@ibourgeois
ibourgeois / create.php
Created May 16, 2015 01:16
PDO Example
<?php
require 'db.php';
if (!empty($_POST)):
$data = array(
'firstname' => $_POST['firstname'],
'lastname' => $_POST['lastname'],
'email' => $_POST['email']
@ibourgeois
ibourgeois / gitup.md
Created May 6, 2015 19:36
Bash Alias For Git Commit

Open your .bashrc file and add the following:

gitup() {
        git add .
        git commit -m "$1"
        git push -u origin master
}

alias gitup=gitup
@ibourgeois
ibourgeois / laravel-routes.php
Last active August 2, 2021 06:55
Bridging Laravel 5 and Lumen with Guzzle
<?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');