Skip to content

Instantly share code, notes, and snippets.

View CGastrell's full-sized avatar

Christian Gastrell CGastrell

View GitHub Profile
@CGastrell
CGastrell / git_branch.sh
Created August 20, 2018 16:12 — forked from dciccale/git_branch.sh
Bash script to get the current git branch and last commit
#!/usr/bin/env bash
# checks if branch has something pending
function parse_git_dirty() {
git diff --quiet --ignore-submodules HEAD 2>/dev/null; [ $? -eq 1 ] && echo "*"
}
# gets the current git branch
function parse_git_branch() {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/\1$(parse_git_dirty)/"
@CGastrell
CGastrell / camera.html
Last active August 29, 2015 14:21 — forked from dhavaln/camera.html
<!DOCTYPE html>
<html>
<head>
<title>Capture Photo</title>
<meta name="viewport" content="width=device-width,height=device-height,initial-scale=1"/>
<script type="text/javascript" charset="utf-8" src="js/phonegap.js"></script>
<script type="text/javascript" charset="utf-8">
var pictureSource; // picture source
var destinationType; // sets the format of returned value
@CGastrell
CGastrell / README.md
Last active August 29, 2015 14:08 — forked from shedd/README.md

Usage

Install cordova into node_modules

npm install cordova

Add icons_and_splash.js