Skip to content

Instantly share code, notes, and snippets.

View marythought's full-sized avatar

Mary Dickson marythought

View GitHub Profile
def array_sum(array)
array.length.times do
temp = array.shift
return [[temp], array] if temp == array.reduce(&:+)
array << temp
end
[]
end
# it passes test cases
@marythought
marythought / article.js
Created February 19, 2016 23:41
WP REST API JavaScript to render blog preview
function Article(object) {
this.title = object.title.rendered;
this.link = object.guid.rendered;
this.excerpt = object.excerpt.rendered;
if (object.content.rendered.match("img .+ src=[\"'](.+?)[\"'].*?") != null) {
this.image = object.content.rendered.match("img .+ src=[\"'](.+?)[\"'].*?")[1];
}
}
Article.prototype.toHtml = function() {
@marythought
marythought / reindeer.rb
Created December 27, 2015 20:43
Reindeer Races from Advent of Code
# --- Day 14: Reindeer Olympics ---
#
# This year is the Reindeer Olympics! Reindeer can fly at high speeds, but must rest occasionally to recover their energy. Santa would like to know which of his reindeer is fastest, and so he has them race.
#
# Reindeer can only either be flying (always at their top speed) or resting (not moving at all), and always spend whole seconds in either state.
class Reindeer
attr_accessor :name, :distance, :fly_time, :rest_time, :track, :points
def initialize(name, distance, fly_time, rest_time)
@marythought
marythought / gist:719f9b0c78a2846485a4
Last active December 14, 2015 00:02
Advent 8 output
"sjdivfriyaaqa\xd2v\"k\"mpcu\"yyu\"en" : 38
sjdivfriyaaqa'v"k"mpcu"yyu"en : 29
"vcqc" : 6
vcqc : 4
"zbcwgmbpijcxu\"yins\"sfxn" : 27
zbcwgmbpijcxu"yins"sfxn : 23
"yumngprx" : 10
yumngprx : 8
"bbdj" : 6
bbdj : 4

Mary Dickson Diaz

Seattle, WA | 206-853-7095 | mdickson@gmail.com | linkedin | github | portfolio

Full-stack software developer specialized in Ruby on Rails and Go, and experienced in web-based apps, REST APIs, microservice architecture, feature development, QA and testing, and working with Agile teams.

Technical Skills

  • Ruby / Ruby on Rails
  • Go
  • JavaScript and JS Frameworks including JQuery, Angular, React & Redux, Backbone
@marythought
marythought / gist:b9af0995afca76a146e7
Last active August 29, 2015 14:26
Peter and the (Beo)Wolf
He felt he upmounted: To embrace them, this has started up her was going at the first words had a good.
The Father unbindeth the moment?
In a big as if they beheld in going to vanish in a dream hanging about everywhere mingled, Helmbearers sturdy!
Madly addicted to her and her.
Perhaps Tink, 'Gainst his shoulder Of Grendel thou in this terrible man against the others girls?
Hullo, if the agehoary warrior was the race of rings he The gaiety of the Scyldings, and at Jane, snakelike, captain to stop showing off had to the bird saw his worth mentioning here are they lay slain.
For the pillar, and at Heorot then Puissant prowess), was because he was saying of men and there is it, then a branch and said Wendy.
No.
A doughty Who sat on wonder.
Then John and ramble.
# this is the file for donorletters code
d = {"mary": 50, "josh": 50, "cassie": 34}
print d
d["mary"] = 100
print d
# ok, this method overwrites the existing donation amt. how can I add an amt?
@marythought
marythought / number guessing game.html
Last active August 29, 2015 14:14
Number guessing game - Code Fellows Foundations I assignment 1
<!DOCTYPE html>
<html>
<script>
var guess, answer, message, done, guessedSoFarLow, guessedSoFarHigh, iteration, low, high;
answer = Math.floor(Math.random() * 100); //math floor rounds down and truncates
done = false;
//keep track of high and low guesses in arrays so we can sort the numbers
guessedSoFarLow = [];