Skip to content

Instantly share code, notes, and snippets.


Wamburu wamburu

Block or report user

Report or block wamburu

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
View gist:5bfa24dbec6281897fd8c82946cba76e
import csv, json, sys
#if you are not using utf-8 files, remove the next line
#sys.setdefaultencoding("UTF-8") #set the encode to utf8
#check if you pass the input file and output file
if sys.argv[1] is not None and sys.argv[2] is not None:
fileInput = sys.argv[1]
fileOutput = sys.argv[2]
inputFile = open(fileInput) #open json file
outputFile = open(fileOutput, 'w') #load csv file
data = json.load(inputFile) #load json content
wamburu / clickapp.js
Last active Jan 5, 2018
ClickSend Arduino
View clickapp.js
var SerialPort = require("serialport").SerialPort,
express = require('express'),
bodyParser = require('body-parser');
// initialize a sample request function
//This request will be posted once the server is started
var request = require('request');
method: 'POST',
wamburu / .hyper.js
Created Aug 1, 2017
Hyper Terminal Configs
View .hyper.js
// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See for all currently supported options.
module.exports = {
config: {
// default font size in pixels for all tabs
fontSize: 14,
// font family with optional fallbacks
wamburu / distance.js
Created Jul 11, 2017
Distance Between Two Coordinates
View distance.js
var directionsService = new google.maps.DirectionsService();
var request = {
origin : 'Melbourne VIC', // a city, full address, landmark etc
destination : 'Sydney NSW',
travelMode : google.maps.DirectionsTravelMode.DRIVING
directionsService.route(request, function(response, status) {
wamburu /
Created May 6, 2017 — forked from iros/
Documenting your REST API


<Additional information about your API call. Try to use verbs that match both request type (fetching vs modifying) and plurality (one vs multiple).>

  • URL

    <The URL Structure (path only, no root url)>

  • Method:

wamburu /
Created Mar 8, 2017 — forked from xesscorp/
Python script for renaming KiCad Gerber files so they'll be accepted by most low-cost PCB fabricators.
# KiCad outputs Gerber files with extensions that aren't recognized by the most commonly used
# PCB manufacturers. This Python script renames the files to what they expect.
# Just execute this script in your KiCad project directory and the Gerber files will be renamed.
import glob
import os
# Make a list of .gbr and .drl files in the current directory.
wamburu /
Created Feb 2, 2017
Automatically Update site While spinning
info() { echo "INFO: $1"; }
die() { echo "ERROR: $1. Aborting!"; exit 1; }
SRC_DIR=$SRC_ROOT/{{ proj_name }}
# stop node apps if they're running
wamburu / menu.html
Created Jan 17, 2017
Side Menu example ionic 1
View menu.html
<ion-view class="ionic" ng-controller="AccountCtrl" scroll="true">
<ion-side-menus ng-controller="NavCtrl">
<ion-side-menu-content ng-controller="NavCtrl">
<ion-nav-bar class="bar bar-header bar-positive">
<button class="button icon ion-navicon" ng-click="showMenu()"></button>
<a href="#/about/home" class="button icon ion-more pull-right"></a>
<!-- <ion-nav-buttons side="left">
<button class="button button-icon button-clear ion-navicon" ng-click="showMenu()">
wamburu / firmatatest.js
Created Dec 8, 2016 — forked from ajfisher/firmatatest.js
Serial comms over hardware UART for Johnny-Five between Arduino and a Raspberry Pi
View firmatatest.js
var firmata = require('firmata');
var repl = require('repl');
var board = new firmata.Board('/dev/ttyAMA0',function(err){
//arduino is ready to communicate
if (err) {
console.log("err:" + err);
console.log("Firmata Firing LEDs");

#Ionic Publish Android App

This is the process to publish an ionic android app.

  1. Make sure you set/increment the version number in config.xml ie 0.0.3.

  2. Make sure the android platform has been added

You can’t perform that action at this time.