Skip to content

Instantly share code, notes, and snippets.

View brghena's full-sized avatar

Branden Ghena brghena

View GitHub Profile
@brghena
brghena / bleno_app.js
Created December 9, 2015 02:56
Noble/Bleno Interference Example
#!/usr/bin/env node
var bleno = require('bleno');
bleno.on('stateChange', function(state) {
console.log("StateChange: " + state);
if (state === 'poweredOn') {
console.log("Starting adv...");
bleno.startAdvertising('Bleno/Noble Test');
} else {
@brghena
brghena / .bashrc
Last active December 16, 2020 16:04
Sensible git submodules
# make git submodules usable
# This overwrites the 'git' command with modifications where necessary, and
# calls the original otherwise
git() {
if [[ $@ == clone* ]]; then
gitargs=$(echo "$@" | cut -c6-)
command git clone --recursive $gitargs
elif [[ $@ == pull* ]]; then
command git "$@" && git submodule update --init --recursive
elif [[ $@ == checkout* ]]; then