A curated list of amazingly awesome PHP libraries, resources and shiny things.
- Composer
- Composer Related
- Frameworks
- Framework Components
| # Based on: http://stackoverflow.com/questions/2218075/using-git-with-your-cakephp-project | |
| # Procedure: | |
| # 1. Remove app/tmp/ from .gitignore | |
| # 2. touch app/tmp/empty | |
| # 3. git add app/tmp/empty | |
| # 4. git commit | |
| # 5. Add app/tmp/ to .gitignore | |
| # Clean tmpfiles and delete .gitignore |
| /* | |
| * Inspired by: | |
| * http://designedbythomas.co.uk/blog/how-detect-width-web-browser-using-jquery | |
| * | |
| * This script is ideal for getting specific class depending on device width | |
| * for enhanced theming. Media queries are fine in most cases but sometimes | |
| * you want to target a specific JQuery call based on width. This will work | |
| * for that. Be sure to put it first in your script file. Note that you could | |
| * also target the body class instead of 'html' as well. | |
| * Modify as needed |
| // Base on awesome work from: | |
| // Mason Wendell http://thesassway.com/intermediate/responsive-web-design-in-sass-using-media-queries-in-sass-32 | |
| // Jason Cypret http://jasoncypret.com/responsive-sass-mixin/ | |
| @mixin respond-to($media) { | |
| @if $media == smartphone { | |
| @media only screen and (min-device-width : 320px) and (max-device-width : 480px) { @content } | |
| } @else if $media == smartphone-l { | |
| @media only screen and (min-width : 321px) { @content } | |
| } @else if $media == smartphone-p { | |
| @media only screen and (max-width : 320px) { @content } |
| #!/bin/sh | |
| set -e | |
| git config -f .gitmodules --get-regexp '^submodule\..*\.path$' | | |
| while read path_key path | |
| do | |
| url_key=$(echo $path_key | sed 's/\.path/.url/') | |
| url=$(git config -f .gitmodules --get "$url_key") | |
| git submodule add $url $path |
| # Thanks to piouPiouM | |
| # | |
| # @see http://stackoverflow.com/questions/9183133/how-to-turn-off-compass-sass-cache-busting/9332472#9332472 | |
| # @link http://pioupioum.fr/developpement/compass-sprites-supprimer-cache-buster.html | |
| # Make a copy of sprites with a name that has no uniqueness of the hash. | |
| on_sprite_saved do |filename| | |
| if File.exists?(filename) | |
| FileUtils.cp filename, filename.gsub(%r{-s[a-z0-9]{10}\.png$}, '.png') | |
| end |
| // Thanks to @robwierzbowski on github | |
| // See https://github.com/nex3/sass/issues/533#issuecomment-11675408 | |
| @function strip-units($value) { | |
| @return $value / ($value * 0 + 1); | |
| } |
| <?php | |
| namespace Helper; | |
| // Select2 helpers for the jQuery based replacement for select boxes. | |
| // See: http://select2.github.io/select2 | |
| // Author: Tortue Torche <[email protected]> | |
| // License: MIT | |
| // | |
| // Installation: | |
| // * Put this file in your 'tests/_support/Helper' directory |