Skip to content

Instantly share code, notes, and snippets.

View Sunnepah's full-sized avatar

Sunday Ayandokun Sunnepah

View GitHub Profile
package wat
// exporting only for testing
var Hello = hello
@tegaphilip
tegaphilip / fabfile.py
Last active December 11, 2016 11:21
Deployment Script for a flask app using Fabric
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'
@gitaarik
gitaarik / git_submodules.md
Last active May 4, 2024 11:10
Git Submodules basic explanation

Git Submodules basic explanation

Why submodules?

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.
@victorbstan
victorbstan / php_object_to_array.php
Created December 17, 2010 04:18
recursively cast a PHP object to array
<?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);