In Git you can add a submodule to a repository. This is basically a repository embedded in your main repository. This can be very useful. A couple of usecases of submodules:
- Separate big codebases into multiple repositories.
package wat | |
// exporting only for testing | |
var Hello = hello |
import json | |
import time | |
from fabric.api import * | |
from fabric.contrib.console import confirm | |
HOOK_URL = 'https://hooks.slack.com/services/XXXXXXXX/XXXXXX/XXXXXXXXXX' | |
env.key_filename = '/path/to/home/dir/.ssh/id_rsa' | |
branch = 'development' | |
code_dir = '/path/to/code/dir' | |
environment = 'development' |
<?php | |
/* | |
This function saved my life. | |
found on: http://www.sitepoint.com/forums//showthread.php?t=438748 | |
by: crvandyke | |
It takes an object, and when all else if/else/recursive functions fail to convert the object into an associative array, this one goes for the kill. Who would'a thunk it?! | |
*/ | |
$array = json_decode(json_encode($object), true); |