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.
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.
As configured in my dotfiles.
start new:
tmux
start new with session name:
/* Default (OS X).sublime-keymap */ | |
/* Key Bindings - User */ | |
[ | |
{ "keys": ["ctrl+shift+."], "command": "erb", "context": | |
[ | |
{ | |
"key": "selector", | |
"operator": "equal", | |
"operand": "text.html.ruby, text.haml, source.yaml, source.css, source.scss, source.js, source.coffee" | |
} |
There's no shortage of good resources for learning laravel. So instead of the usual introductory tutorial were just gonna learn Laravel by building a project from scratch and that's gonna be a User Management System.
I don't know if my definition of a User Management System is correct but here's my idea of what's it's capable of doing:
/* http://www.zeldman.com/2012/03/01/replacing-the-9999px-hack-new-image-replacement/ */ | |
overflow: hidden; | |
text-indent: 100%; | |
white-space: nowrap; |
So you want to accept payments online with PHP? | |
- Well, you probably don't want to handle that process manually. Too dangerous and risky. | |
- So learn the Stripe API. Works great! | |
- But you'll still need to setup SSL. So go learn how to do that. | |
- Stripe provides a PHP package, so download that through Composer. If you're not familiar with Composer, you'll need to learn that too. | |
- If you want the most flexibility, you'll want to manually create the payment form. | |
- So you'll need to send an AJAX request with a special token to Stripe's API. jQuery makes this easy, so go learn jQuery. | |
- Once the payment completes, you'll likely want to send the buyer a "Purchased" email, so learn how to send email. | |
- But don't make the user wait for the email to send. That takes too long. Add that to a background job. |
alias gundo='git reset HEAD~ && git clean -df' |
<?php | |
use Illuminate\Support\Contracts\ArrayableInterface; | |
use Illuminate\Support\Contracts\JsonableInterface; | |
class Excel implements ArrayableInterface, JsonableInterface{ | |
protected $objPHPExcel; | |
public function __construct($file){ | |
if($file instanceof \SplFileInfo){ | |
$filename = $file->getRealPath(); |
#!/usr/bin/env ruby | |
# make sure you the watir gem installed -> gem install watir | |
require 'watir' | |
def log (message) puts " #{message}" end | |
def success (message) puts "+ #{message}" end | |
def fail (message) puts "- #{message}" end | |
def notify (message) | |
success message.upcase | |
system 'osascript -e \'Display notification Burgerbot with title "%s"\'' % message | |
rescue StandardError => e |