This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$is_ie = (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') === false)? FALSE : TRUE; | |
?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# mio -- minimalist language inspired by Io for your own careful | |
# and private delectation w/ friends of the the family, | |
# if you want to. | |
# usage: | |
# mio # starts the REPL | |
# mio mio_on_rails.mio | |
# (c) macournoyer | |
module Mio | |
class Error < RuntimeError |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 1209600 is the amount of seconds in 14 days | |
d = Time.new - 1209600 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git whatchanged --since="yesterday" | |
git whatchanged --oneline --since="1 week" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
heroku create <app name> --stack cedar |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wc -l `find . -iname "*.php"` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Add a new product to the system | |
* | |
* @param string $sku | |
* @param float $cost | |
* @param string $name | |
* @param string $desc | |
* @param float $markup | |
* @param int $categories_id |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1) Open up the terminal | |
2) Don't use version of PEAR that came with OS-X, use the one that came with MAMP (/Applications/MAMP/bin/php/php5.3.6/bin/pear) | |
3) Upgrade PEAR: | |
/Applications/MAMP/bin/php/php5.3.6/bin/pear channel-update pear.php.net | |
/Applications/MAMP/bin/php/php5.3.6/bin/pear channel-update upgrade pear | |
If you receive the following error: `Notice: unserialize(): Error at offset 276 of 1133 bytes in Config.php on line 1050`, | |
delete the PEAR config file found here: /Applications/MAMP/bin/php/php5.3.6/conf/pear.conf | |
4) Register the channels: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
img { | |
width:auto; | |
max-width:100%; | |
height:auto; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80; | |
listen [::]:80; | |
root /var/www/site; | |
index index.php index.html index.htm; | |
server_name _; | |
autoindex on; | |
access_log off; | |
# Kirby Specific Directories |
OlderNewer