git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
| <?php | |
| /** | |
| * FormTools Spam Honeypot | |
| * | |
| * Use in conjunction with a form field like | |
| * <input type="text" id="url_2" name="url_2" /> | |
| * And then hide the field using CSS. If the field gets filled out, | |
| * then it was a spam bot that did it, and we can ignore the submission. | |
| * Otherwise, we use cURL to send the submission on to our FormTools application | |
| * at http://forms.epraxa2.com |
| <!doctype html> | |
| <title>Site Maintenance</title> | |
| <style> | |
| body { text-align: center; padding: 150px; } | |
| h1 { font-size: 50px; } | |
| body { font: 20px Helvetica, sans-serif; color: #333; } | |
| article { display: block; text-align: left; width: 650px; margin: 0 auto; } | |
| a { color: #dc8100; text-decoration: none; } | |
| a:hover { color: #333; text-decoration: none; } | |
| </style> |
A list of amazingly awesome PHP libraries that you should be using:
⇐ back to the gist-blog at jrw.fi
Or, 16 cool things you may not have known your stylesheets could do. I'd rather have kept it to a nice round number like 10, but they just kept coming. Sorry.
I've been using SCSS/SASS for most of my styling work since 2009, and I'm a huge fan of Compass (by the great @chriseppstein). It really helped many of us through the darkest cross-browser crap. Even though browsers are increasingly playing nice with CSS, another problem has become very topical: managing the complexity in stylesheets as our in-browser apps get larger and larger. SCSS is an indispensable tool for dealing with this.
This isn't an introduction to the language by a long shot; many things probably won't make sense unless you have some SCSS under your belt already. That said, if you're not yet comfy with the basics, check out the aweso
This repo has some handy handy hooks to run bundle or npm install whenever you:
git checkout a new branch with a different Gemfile or package.jsongit pull a change to Gemfile or package.jsongit clone https://gist.github.com/5869846.git hooks && cd hooks && chmod +x install| <?php | |
| namespace Hello\WorldBundle\DBAL; | |
| use Doctrine\ORM\Query\Lexer; | |
| use Doctrine\ORM\Query\AST\Functions\FunctionNode; | |
| /** | |
| * TimeToSecFunction ::= "TIME_TO_SEC" "(" ArithmeticPrimary "," ArithmeticPrimary ")" | |
| */ |
| <?php | |
| $tokenGenerator = $this->getContainer()->get('fos_user.util.token_generator'); | |
| $password = substr($tokenGenerator->generateToken(), 0, 8); // 8 chars |
| # For a symfony application to work properly, you MUST store this .htaccess in | |
| # the same directory as your front controller, index.php, in a standard symfony | |
| # web application is under the "public" project subdirectory. | |
| # Use the front controller as index file. | |
| DirectoryIndex index.php | |
| # Uncomment the following line if you install assets as symlinks or if you | |
| # experience problems related to symlinks when compiling LESS/Sass/CoffeScript. | |
| # Options +FollowSymlinks |
| #!/bin/bash | |
| target_branch="production" | |
| working_tree="PATH_TO_DEPLOY" | |
| while read oldrev newrev refname | |
| do | |
| branch=$(git rev-parse --symbolic --abbrev-ref $refname) | |
| if [ -n "$branch" ] && [ "$target_branch" == "$branch" ]; then | |