Skip to content

Instantly share code, notes, and snippets.

View jorgeandrescastro's full-sized avatar

Jorge Andrés Castro jorgeandrescastro

  • Berlin, Germany
View GitHub Profile
@jorgeandrescastro
jorgeandrescastro / gist:c22e30350a47ff3429e3cf86ba7eb038
Created October 4, 2016 14:06 — forked from stuart11n/gist:9628955
rename git branch locally and remotely
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
@jorgeandrescastro
jorgeandrescastro / Process_Manager.php
Created January 25, 2016 14:48 — forked from compwright/Process_Manager.php
Demo code used in my "Multitasking in PHP" presentation at the December 2012 Atlanta PHP user group meetup
<?php
class Process_Manager implements Countable
{
protected $processes = array();
protected $is_child = FALSE;
public function count()
{
return count($this->processes);
/*
* Normalized hide address bar for iOS & Android
* (c) Scott Jehl, scottjehl.com
* MIT License
*/
(function( win ){
var doc = win.document;
// If there's a hash, or addEventListener is undefined, stop here
if( !location.hash && win.addEventListener ){