Skip to content

Instantly share code, notes, and snippets.

@johnypony3
johnypony3 / brew-formulae-update.sh
Last active May 7, 2017 13:59
cleanup, update, upgrade bundle, update all casks
#!/bin/bash
brew cleanup
brew cask cleanup
brew update
brew upgrade
#brew bundle

Squashing commits the easy way

Rewriting history is only safe if no one depends on your branch.

So for example never do this on parent branches ie: develop, master, a feature branch with child branches, etc.

Example workflow:

  1. Make feature branch
  2. Haxxor
  3. Push to origin (optional but your dentist recommends you floss)
  4. Repeat steps 2 - 3 as necessary
  5. Squash commits using the function in this article
@johnypony3
johnypony3 / sns-mqtt-lambda
Last active January 11, 2017 22:48
a labda function that subscribes to an sns queue and pushes data to an mqtt queue
We couldn’t find that file to show.
@johnypony3
johnypony3 / fenix4
Last active January 11, 2017 22:48
this is the content source directory for a fenix4 app posts to a restful api, which in turn does home automation
fenix4
@johnypony3
johnypony3 / alexa homeskill lambda to sns
Created January 11, 2017 21:02
this is a lambda function to be used by an alexa homeskill. this will write to a sns topic, the idea is to have another lambda function subscribe, and act
/**
* This sample demonstrates a simple driver built against the Alexa Lighting Api.
* For additional details, please refer to the Alexa Lighting API developer documentation
* https://developer.amazon.com/public/binaries/content/assets/html/alexa-lighting-api.html
*/
var https = require('https');
var AWS = require('aws-sdk');
var REMOTE_CLOUD_BASE_PATH = '/';
var REMOTE_CLOUD_HOSTNAME = 'www.amazon.com';