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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
<!-- Android --> | |
<link href="http://www.yoursite.com/apple-touch-icon.png" rel="apple-touch-icon-precomposed"/> | |
<!-- iOS --> | |
<link href="http://www.yoursite.com/apple-touch-icon.png" rel="apple-touch-icon" /> | |
<link href="http://www.yoursite.com/apple-touch-icon-76x76.png" rel="apple-touch-icon" sizes="76x76" /> | |
<link href="http://www.yoursite.com/apple-touch-icon-120x120.png" rel="apple-touch-icon" sizes="120x120" /> | |
<link href="http://www.yoursite.com/apple-touch-icon-152x152.png" rel="apple-touch-icon" sizes="152x152" /> | |
<!-- Windows --> |
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
ini_set('display_errors', 'On'); | |
error_reporting(E_ALL | E_STRICT); |
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
#!/bin/sh | |
type apt-cyg || exit | |
apt-cyg install git python-{jinja2,six,yaml} | |
git clone --depth 1 git://github.com/ansible/ansible | |
cd ansible | |
PATH+=:~+/bin | |
export PYTHONPATH=~+/lib | |
ansible --version |
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
Install: | |
sudo dpkg -i packagename.deb | |
Remove: | |
sudo dpkg -r packagename | |
Reconfigure/Repair: | |
sudo dpkg-reconfigure packagename |
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
# This is not so much a fix, just a work around to get into the vm box once loaded. | |
# This problem seems to be only with ubuntu14 32 bit version vagrant boxes. At least thats the case on my system. | |
config.ssh.username = "vagrant" | |
config.ssh.password = "vagrant" | |
config.ssh.insert_key = false |
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
composer create-project laravel/laravel FOLDER --prefer-dist | |
** check /etc/nginx/sites-avalaible/domain for correct settings |
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
sudo add-apt-repository ppa:nginx/stable | |
sudo apt-get update | |
sudo apt-get install nginx |
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
// path to / (root) | |
base_path(); | |
// path to /app | |
app_path(); | |
// path to /app/storage | |
storage_path(); | |
// path to /public |
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
// invoke method | |
$object = getObject(); | |
$method = 'methodName'; | |
echo $object->$method(); | |
// or | |
$returnValue = call_user_func( array( $object, $method ) ); | |
// get all methods of a class | |
print_r( get_class_methods( 'ClassName' ) ); |
OlderNewer