Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
| /* The API controller | |
| Exports 3 methods: | |
| * post - Creates a new thread | |
| * list - Returns a list of threads | |
| * show - Displays a thread and its posts | |
| */ | |
| var Thread = require('../models/thread.js'); | |
| var Post = require('../models/post.js'); |
| <?php | |
| function save_images($object_id, $string, $overwrite=false) { | |
| if (!function_exists('imagecreatefromstring')) { | |
| throw new \Exception("This script requires the imagecreatefromstring function from the GD extension (http://www.php.net/manual/en/book.image.php)."); | |
| } | |
| // This part could probably be better | |
| $types = array( | |
| 'image/jpeg' => 'jpg', |
Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
| require 'mina/bundler' | |
| require 'mina/rails' | |
| require 'mina/git' | |
| require 'mina/rbenv' | |
| # Basic settings: | |
| # domain - The hostname to SSH to | |
| # deploy_to - Path to deploy into | |
| # repository - Git repo to clone from (needed by mina/git) | |
| # user - Username in the server to SSH to (optional) |
| # Capistrano Laravel 4 Deployment Tasks | |
| # Watts Martin (layotl at gmail com) | |
| # https://gist.github.com/chipotle/5506641 | |
| # updated 14-Aug-2013 | |
| # Assumptions: | |
| # | |
| # - You are using a .gitignore similar to Laravel's default, so your | |
| # vendor directory and composer(.phar) are *not* under version control | |
| # - Composer is installed as an executable at /usr/local/bin/composer |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000ror, scala, jetty, erlang, thrift, mongrel, comet server, my-sql, memchached, varnish, kestrel(mq), starling, gizzard, cassandra, hadoop, vertica, munin, nagios, awstats
| <?php | |
| /** | |
| * A helper file for Laravel 5, to provide autocomplete information to your IDE | |
| * Generated for Laravel Lumen (5.1.1) (Laravel Components 5.1.*) on 2015-08-18. | |
| * | |
| * @author Barry vd. Heuvel <barryvdh@gmail.com> | |
| * @see https://github.com/barryvdh/laravel-ide-helper | |
| */ | |
| namespace { |
| package main | |
| import ( | |
| "context" | |
| "flag" | |
| "fmt" | |
| "log" | |
| "net/http" | |
| "os" | |
| "os/signal" |