Skip to content

Instantly share code, notes, and snippets.

Hadrien htulipe

Block or report user

Report or block htulipe

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@htulipe
htulipe / gist:ba250e1c9231fad05e2a
Last active Jan 14, 2016 — forked from nikreiman/gist:5458386
Clean up local branches that are already on master (credit to original gist)
View gist:ba250e1c9231fad05e2a
function git-branch-current() {
printf "%s\n" $(git branch 2> /dev/null | grep -e ^* | tr -d "\* ")
}
function git-branch-cleanup() {
local currentBranch=$(git-branch-current)
local otherBranch=
for otherBranch in $(git branch | grep -v $currentBranch) ; do
printf "Branch %s:\n" "$otherBranch"
printf " HEAD commit is: %s\n" "$(git log --oneline -n 1 $otherBranch)"
@htulipe
htulipe / cordova-device-ready.js
Last active Sep 12, 2018
Wait for Phonegap's deviceready event before initializing an Ember application
View cordova-device-ready.js
import isOnCordova from '../utils/is-on-cordova';
export function initialize(container, application) {
application.deferReadiness();
document.addEventListener('deviceready', function() {
application.advanceReadiness();
}, false);
if(!isOnCordova()){
document.dispatchEvent(new Event('deviceready'));
}
You can’t perform that action at this time.