Skip to content

Instantly share code, notes, and snippets.

View philmill's full-sized avatar
👨‍🚀
Exploring This Continuum

Phil Miller philmill

👨‍🚀
Exploring This Continuum
View GitHub Profile
@philmill
philmill / gist:0683397a10a962949603be175a541438
Created January 22, 2018 18:41
Blockstack Verification
Verifying my Blockstack ID is secured with the address 16F8YJrWTHgMSdpZ8tpYgfWLodzbqwv4BL https://explorer.blockstack.org/address/16F8YJrWTHgMSdpZ8tpYgfWLodzbqwv4BL

3 Main Principles

Single Immutable State Tree

All application state is contained in a single object tree which cannot be modified directly.

Actions

Actions are used to modify the app state tree. They're objects which describe changes. They only require a type key with other info to describe the change. Any data that will be represented by the app tree will get there via actions regardless of source (UX || Network).

{ type: "ADD_ITEM",
 index: 1,
@philmill
philmill / rabbit-upgrade-info.md
Created June 18, 2015 17:59
Rabbitmq Upgrade Gotcha

Homebrew Upgrade of Rabbitmq Gotcha

If you recieve something like {could_not_start,rabbit,{previous_upgrade_failed,{rabbit,start,[normal,[]]}}}, searching for could_not_start didn't provide me with much help.

Remove previous mnesia contents

For rabbitmq: stable 3.5.3 this is located at /usr/local/var/lib/rabbitmq/mnesia/.

Simply rm -rf * to remove all of it's contents.

@philmill
philmill / niceties.coffee
Last active August 29, 2015 14:14
CoffeeScript Niceties
# jQuery(function($){
# });
# can be re-written as
jQuery ($) ->
console.log 'stuff'
# or if jQuery is only one useing $
$ ->
console.log 'stuff'
@philmill
philmill / ruby_bre.rb
Last active February 5, 2016 21:39
Ruby: Begin Rescue Ensure
begin
# something which might raise an exception
rescue SomeExceptionClass => some_variable
# code that deals with some exception
rescue SomeOtherException => some_other_variable
# code that deals with some other exception
else
# code that runs only if *no* exception was raised
ensure
# ensure that this code always runs, no matter what
@philmill
philmill / javascript_notes.js
Last active February 16, 2016 18:35
Subtle and Illuminating Notes about JavaScript
// Falsey
0, NaN, ""
// Automatic Type Conversion!!!
console.log(8 * null)
//> 0
console.log("5" - 1)
//> 4
console.log("5" + 1)
//> 51
@philmill
philmill / jquery_notes.js
Created June 12, 2014 20:32
jQuery Notes
// inspect an element for events (jquery <= 1.7)
$("SELECTOR").data("events");
// not selector
$( "input:not(:checked)" )