Skip to content

Instantly share code, notes, and snippets.

View justclint's full-sized avatar

justclint justclint

View GitHub Profile
@justclint
justclint / 0_reuse_code.js
Created February 17, 2014 05:04
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@justclint
justclint / gist:eb4f61199c7d89a5aeeb
Last active August 29, 2015 14:02
Mobile Device Site Touch Icons
<!-- 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 -->
ini_set('display_errors', 'On');
error_reporting(E_ALL | E_STRICT);
#!/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
@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
@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 / 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
sudo add-apt-repository ppa:nginx/stable
sudo apt-get update
sudo apt-get install nginx
// path to / (root)
base_path();
// path to /app
app_path();
// path to /app/storage
storage_path();
// path to /public
// 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' ) );