Skip to content

Instantly share code, notes, and snippets.

Awesome PHP Libraries

A list of amazingly awesome PHP libraries that you should consider using (and some other shiny extras).

@lewiswharf
lewiswharf / gist:4534216
Last active December 11, 2015 02:58
pgi.stripe.php
<?php
require_once(EXTENSIONS . '/pgi_loader/lib/class.paymentgateway.php');
require_once(EXTENSIONS . '/stripe/lib/class.stripesettings.php');
require_once(EXTENSIONS . '/stripe/api/lib/Stripe.php');
Class StripePaymentGateway extends PaymentGateway {
public function about() {
return array(
<data>
<preferences>
<sitename>Client - Portfolio</sitename>
<languages>
<entry id="1" handle="english" lang="en">English</entry>
<entry id="2" handle="francais" lang="fr">Francais</entry>
</languages>
<stylesheets><entry id="1"><url link="http://link-to-main.stylesheet.css"/></entry></stylesheets>
<scripts><entry id="1"><url link="http://link-to-main.stylesheet.css"/></entry></scripts>
<navlinks>
@lewiswharf
lewiswharf / gist:1894524
Created February 23, 2012 19:31
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (PC)

Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.

Editing

Ctrl+C copy current line (if no selection)
Ctrl+X cut current line (if no selection)
Ctrl+⇧+K delete line
Ctrl+↩ insert line after
@lewiswharf
lewiswharf / AddExtension.sh
Created January 4, 2012 00:07
Use Symphony and Extensions as subtrees in your own project git repository.
#!/usr/bin/env bash
DEFAULT_BRANCH="master"
. .symbuilder
extensions=$webroot"/extensions/"
if [ $# -eq 1 ]
then
# get a name for new project from command line arguments
extension_name="$1"