Skip to content

Instantly share code, notes, and snippets.

View justclint's full-sized avatar

justclint justclint

View GitHub Profile
1. Fork it
2. Create your feature branch (git checkout -b my-new-feature)
3. Commit your changes (git commit -am 'Add some feature')
4. Push to the branch (git push origin my-new-feature)
5. Create new Pull Request on the develop branch
// more info @ http://www.w3schools.com/svg/svg_polygon.asp
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 1920 72" xml:space="preserve" preserveAspectRatio="none">
<polygon fill="#FFFFFF" points="0,0 0,72 1920,72 "></polygon>
</svg>
// 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' ) );
// path to / (root)
base_path();
// path to /app
app_path();
// path to /app/storage
storage_path();
// path to /public
sudo add-apt-repository ppa:nginx/stable
sudo apt-get update
sudo apt-get install nginx
@justclint
justclint / composer-install-larevel
Created January 29, 2016 22:45
install laravel with composer
composer create-project laravel/laravel FOLDER --prefer-dist
** check /etc/nginx/sites-avalaible/domain for correct settings
@justclint
justclint / vagrant-ubunut-trusty32-ssh-fix
Created January 28, 2016 19:58
Bypass ssh access when vagrant/ubuntu14 box wont connect to network
# 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
@justclint
justclint / dpkg.info
Last active January 26, 2016 19:39
Manage .deb package files
Install:
sudo dpkg -i packagename.deb
Remove:
sudo dpkg -r packagename
Reconfigure/Repair:
sudo dpkg-reconfigure packagename
#!/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