Skip to content

Instantly share code, notes, and snippets.

View danmayer's full-sized avatar

Dan Mayer danmayer

View GitHub Profile
@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
@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';
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 / gem_updated
Created July 3, 2014 20:20
gem update in progress
GEM_NAME = "ls-secure_gmaps"
COMMIT_MESSAGE = "update to latest ls-secure_gmaps\n This makes sure all calls are made with the correct keys for our new contract"
APPS = ["browse", "browse-service", "escapes", "events", "preferences", "sponsors"]
CMDS = ["git pull origin master",
"bundle install",
"bundle exec rake",
"bundle update #{GEM_NAME}",
"bundle exec rake",
@danmayer
danmayer / covercheck.rb
Last active August 29, 2015 14:02
Example of Coverage bug causing a problem for Coverband
def method_a
puts "hi"
end
def method_b
puts "boom goes the awesome"
end
method_a
#specific commiter
git log --numstat --pretty="%H" --author="dan.mayer" --since="2 years ago" app | awk 'NF==3 {plus+=$1; minus+=$2} END {printf("+%d, -%d\n", plus, minus)}
#team total
git log --numstat --pretty="%H" --since="2 years ago" app | awk 'NF==3 {plus+=$1; minus+=$2} END {printf("+%d, -%d\n", plus, minus)}
@danmayer
danmayer / gist:9477044
Created March 11, 2014 00:05
articles about developers and age
http://www.wired.com/wiredenterprise/2013/04/developers-age/
http://www.linkedin.com/today/post/article/20130422020049-8451-the-tech-industry-s-darkest-secret-it-s-all-about-age
http://www.bloombergview.com/articles/2012-04-22/software-engineers-will-work-one-day-for-english-majors
http://heartmindcode.com/2013/08/16/loyalty-and-layoffs/
a counterpoint
http://coding-and-more.blogspot.com/2011/06/its-official-developers-get-better-with.html
a pair, article and a response
http://prog21.dadgum.com/154.html
@danmayer
danmayer / gist:8816670
Last active August 29, 2015 13:56
client for remote configuring a jenkins
#!/usr/bin/env ruby
require 'jenkins_api_client'
require 'ruby-debug'
CI_PROJECT_NAME = "server_responder"
@client = JenkinsApi::Client.new(:server_ip => 'localhost',
:server_port => '8888',
:username => 'somename',