Skip to content

Instantly share code, notes, and snippets.

View danmayer's full-sized avatar

Dan Mayer danmayer

View GitHub Profile
@danmayer
danmayer / MyWife.js
Last active July 24, 2018 10:17
Alexa skill to compliment my wife
/* eslint-disable func-names */
/* eslint quote-props: ["error", "consistent"]*/
/**
* This is an skill to learn how the Alexa API works. Created by Dan Mayer
* Built with the Amazon Alexa Skills nodejs skill development kit.
* Initially edited from the getFact example.
**/
'use strict';
@danmayer
danmayer / tech_books.csv
Last active March 25, 2018 19:46
Tech Books
Book Theme Recommended By Notes
[Remote: Office Not Required](http://batman.com) Distributed Work Moyinoluwa Adeyemi A great book about how to function as a distributed team. Full review here: https://tech.offgrid-electric.com/book-review-remote-office-not-required-e75e19c68529
Radical Candor: Be a Kick-Ass Boss Without Losing Your Humanity Communication / Team Management Thor Muller From the time we learn to speak, we’re told that if you don’t have anything nice to say, don’t say anything at all. When you become a manager, it’s your job to say it--and your obligation.
Emotional Intelligence 2.0 Communication / Self Management Dian four, core EQ skills that enable you to achieve your fullest potential: 1) Self-Awareness 2) Self-Management 3) Social Awareness 4) Relationship Management
Creativity, Inc - Ed Catmull  Creative work / Collaboration Dan Mayer How to encourage deep thought and creativity in a working environment, told through the story of Pixar
@danmayer
danmayer / markdown_to_confluence.rb
Created August 16, 2017 22:03
convert a folder of markdown files to confluence wiki docs
#!/usr/bin/env ruby
require 'rubygems'
require 'confluence/api/client'
require 'kramdown'
username = 'your@email.com'
password = 'your_pass'
url = 'https://your_co.atlassian.net/wiki'
@danmayer
danmayer / ids
Last active June 28, 2017 14:36
2770974,447471,347275,2631820,4533163,2293233,318889,2494566,347768,2181338,2186823,2187064,2943324,450480,2639761,359716,2182727,2588598,2689863,356323,2693249,2797094,3014580,2689846,18718,4690,4424791,345892,45555,2563595,39988,344328,2564509,2796920,2268009,2163435,339673,2402345,2475185,2362073,2562086,2947240,2587843,2444014,2796839,2352346,4429153,2190000,2202755,2951547,6930286,1988116,2563497,2166433,456221,2177708,4445092,2192567,2176698,2269534,2679292,2688183,2197805,4444909,2216995,2636337,2445616,6930281,338265,318777,2192039,348279,2189693,339458,2197795,2202141,6932881,2198062,2563451,2590258,3548732,2286806,337222,2434644,4598777,1987776,4501193,346553,2186794,2953853,445846,2632140,2167144,2619750,2434197,1988021,456493,342627,2785558,2198116,2196382,2416087,18749,2168101,2841438,2840233,22109,346262,354955,21737,1988117,1987799,344598,2444151,4429376,337038,2684836,2273783,2590668,2770909,319590,2178056,4524902,2563462,338796,2950218,325624,2211886,2191643,2162262,2182596,2176816,2830349,21
Yeah AWS Lambda / API gateway and such, I do think in terms of a no manage DB firebase looks better.
The concern I have with all of the serverless approaches comes down to scaling with a team:
* The deployment story is still a bit messy
* dev environment generally connects to shared resource
* testing is tricky / non existant
* debugging tools aren't up to speed.
* doesn't do well with dev/staging/prod completely forgetting as the team scales branch based dev
* less so on AWS to standard DBs, but firebase doesn't have a great story for data analysis yet.
@danmayer
danmayer / gist:f66782e13bd8c327a9fe
Created April 21, 2015 02:22
setting devise passwords on users from parse and proving it works
user_pass = "password1"
User.where(:email => 'danmayer@gmail.com').first.update(password: user_pass, password_confirmation: user_pass)
resource = User.find_by_email("danmayer@gmail.com")
bcrypt = BCrypt::Password.new(resource.encrypted_password)
password = BCrypt::Engine.hash_secret("#{user_pass}", bcrypt.salt)
valid = Devise.secure_compare(password, resource.encrypted_password)
#true
@danmayer
danmayer / churn_swagger_client.rb
Created January 26, 2014 19:53
churn swagger client
$:.unshift "#{File.dirname(__FILE__)}/lib"
require "swagger"
# Get request API endpoints
require "index_api"
require "project_name_api.rb"
require "project_path_api.rb"
# Post request endpoints
@danmayer
danmayer / gist:8610207
Created January 25, 2014 01:11
success for one endpoint
./bin/runscala.sh -DskipErrors com.wordnik.swagger.codegen.BasicRubyGenerator http://churn.picoappz.com/api-docs "key"
base path is http://churn.picoappz.com/api-docs
********* Failed to read swagger json!
Error: Operation - responseClass | missing required field
**** ignoring errors and continuing
swagger version: 1.2
basePath:
api version: 1.0
missing models: Set()
----------
@danmayer
danmayer / gist:7295057
Created November 3, 2013 21:28
to cook
Crepes with veggies: http://projects.washingtonpost.com/recipes/2013/07/10/ratatouille-tomato-crepes/
Corn cakes, if there is still any corn tomorrow: http://www.nytimes.com/recipes/1014967/sweet-corn-blini.html
Stuffed peppers: http://www.nytimes.com/recipes/1014968/feta-stuffed-peppers.html
Chili mac and cheese; http://www.gracelaced.com/2011/09/26/baked-green-chile-mac-and-cheese/
@danmayer
danmayer / tap_with_each.rb
Created November 2, 2013 16:34
tap with each
# do this opposed to each_with_object or inject
# from http://phrogz.net/tap-vs-each_with_object
by_id = {}.tap{ |h| items.each{ |item| h[item.id] = item } }