Install git:
sudo apt-get install git
Configure Git:
touch ~/.gitignore_global
git config --global core.excludesfile ~/.gitignore_global
git config --global user.name "Your Name"
git config --global user.email "Your Email"
apt-get install xvfb | |
apt-get install firefox |
Install git:
sudo apt-get install git
Configure Git:
touch ~/.gitignore_global
git config --global core.excludesfile ~/.gitignore_global
git config --global user.name "Your Name"
git config --global user.email "Your Email"
<?php | |
use Doctrine\ORM\EntityManager, | |
Doctrine\ORM\Configuration, | |
Doctrine\ORM\Mapping\ClassMetadata; | |
/** | |
* Active Entity trait | |
* | |
* Limitations: a class can only ever be assocaited with ONE active entity manager. Multiple entity managers |
import ast | |
from cStringIO import StringIO | |
import sys | |
INFSTR = '1e308' | |
def interleave(inter, f, seq): | |
seq = iter(seq) | |
try: | |
f(next(seq)) |
I've collected all the links related to Backbone.js that I find useful. Most of these are well-built projects and epic guides (not ephemeral blog posts.) Please feel free to fork and even contribute.
<?php | |
/* | |
* This is just a simple function that dumps the name of the variable(s) | |
* being inspected instead of the values as var_dump() does. | |
*/ | |
function var_name() | |
{ | |
$bt = debug_backtrace(); |
/** | |
* WkHtmlToPdf table splitting hack. | |
* | |
* Script to automatically split multiple-pages-spanning HTML tables for PDF | |
* generation using webkit. | |
* | |
* To use, you must adjust pdfPage object's contents to reflect your PDF's | |
* page format. | |
* The tables you want to be automatically splitted when the page ends must | |
* have a class name of "splitForPrint" (can be changed). |
<?php | |
/** | |
* PHP Regex to validate a Twitter hashtag | |
* | |
* Useful for validating a text input (an HTML form in your CMS or custom application) that must be a valid Twitter hashtag. | |
* Valid examples: #a, #_, #_1, #_a, #1a, #áéìôü, #123hàsh_täg446 | |
* Invalid examples: #1, ##hashtag, #hash-tag, #hash.tag, #hash tag, #hashtag!, (any hashtag that is more than 140 characters long, hash symbol included) | |
* | |
* Regex explanation: | |
* First, the lookahead assertion (?=.{2,140}$) checks the minimum and max length, as explained here http://stackoverflow.com/a/4223213/1441613 |
#Introduction If you're a php developer on ubuntu, there comes the time where you have to install/reinstall your system. I did it already a few times and i decided to write down the steps for a typical web developer stack with php. This is for a developer machine and not for a live environment!
I hope it helps you too!
fyi @mheiniger and me started with an installer here: https://github.com/mheiniger/webdev-setup
I have managed to install this… and make it work. I implemented it for Facebook and Google, but you can extend it. My solution it is mostly as described in #116, with a bit of more code presented. The key aspects that lack in the #116 presentation (IMO) are:
oauth_user_provider
in the security.yml
with your custom created serviceHere are the steps:
routing.yml
I have added all the routes for both bundles.config.yml
mostly as it is presented in the HWIOAuthBundle.security.yml
mostly as it is presented in the HWIOAuthBundle (though my routes are using /login
pattern, not /connect
). Also, the oauth_user_provider
is set for my custom service.