Skip to content

Instantly share code, notes, and snippets.

View patrick-hertling's full-sized avatar

Patrick Hertling patrick-hertling

View GitHub Profile
@patrick-hertling
patrick-hertling / git-webhook.php
Created September 29, 2015 13:49
GIT Webhook
<?php
/**
* GIT Webhook
*
* Instructions:
* 1. Set up SSH Keys
* 2. Register SSH Keys and Webhook on VCS
* 3. Set up the GIT remote vía SSH
* 4. Register variables in this script
*
@patrick-hertling
patrick-hertling / index.php
Last active October 1, 2015 12:48
PDO Quickstart Guide
<?php
/**
* Quickstart:
* The following sequence should only give an idea of how to use PDO
* DON'T USE THIS CODE FOR A REAL SCENARIO!
*/
$dsn = 'mysql:dbname=name_of_your_table'; // Define 'data source name'
$user = 'username'; // Define username
$pass = 'secret'; // Defeine password
$pdo = new PDO($dsn, $user, $pass); // Create the PDO object