A ZSH theme optimized for people who use:
- Solarized
- Git
- Unicode-compatible fonts and terminals (I use iTerm2 + Menlo)
For Mac users, I highly recommend iTerm 2 + Solarized Dark
"\e[1~": beginning-of-line | |
"\e[4~": end-of-line | |
"\e[5~": history-search-backward | |
"\e[6~": history-search-forward | |
"\e[3~": delete-char | |
"\e[2~": quoted-insert | |
"\e[5C": forward-word | |
"\e[5D": backward-word | |
"\e\e[C": forward-word | |
"\e\e[D": backward-word |
set input-meta on | |
set output-meta on | |
set convert-meta off | |
# To use these in ITerm2 you may also need to configure preferences to send the correct escape | |
# code for the key combination. | |
# Option + Arrows to jump words. | |
"\e[1;5C": forward-word | |
"\e[1;5D": backward-word |
100 Continue | |
101 Switching Protocols | |
102 Processing (WebDAV; RFC 2518) | |
200 OK | |
201 Created | |
202 Accepted | |
203 Non-Authoritative Information (since HTTP/1.1) | |
204 No Content | |
205 Reset Content | |
206 Partial Content |
mysqldump [database] | pv | gzip -c > [file].sql.gz |
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 8000
# to generate your dhparam.pem file, run in the terminal | |
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
<?php | |
class MyModel extends Eloquent { | |
public function getSql() | |
{ | |
$builder = $this->getBuilder(); | |
$sql = $builder->toSql(); | |
foreach($builder->getBindings() as $binding) | |
{ |