Skip to content

Instantly share code, notes, and snippets.

View booherbg's full-sized avatar

Blaine Booher booherbg

View GitHub Profile
@booherbg
booherbg / arrow-functions.md
Last active May 27, 2020 15:09
Arrow Functions

Arrow Function Intro

function name(me) {
  console.log('my name is', me);
}

const name = function(me) {
  console.log('my name is', me);
}
@booherbg
booherbg / for-loops.md
Last active April 22, 2020 20:42
Simple For Loops

Week 3 Stretch Goal Tips

In general there are two types of problems to solve:

  1. "Calculate some value based on all the numbers in the array"
  2. "Find a number in the array and stop once you've found it"

In pretty much all cases, all you need to do is have a way of looping through the array of numbers, keeping track of what you have done so far, and reporting the result at the end.

Jun 25 2017

Interested in becoming friendly with local crows after reading stories and first hand accounts. Obtained peanuts. Later, found grackles, but not crows. They're smaller and travel in larger flocks. Were not very interested in peanuts. They have irridescent blue heads. Curious if the small blue glass left in my garden is from the crows?

Squirrels like peanuts too. I threw a peanut towards an squirrel and it bounced off him. It did not phase him. He ate the peanut.

Jun 27 2017

Notes on upgrading to Elasticsearch 5.0.1 from 2.4

First get the latest ES (2.4):

# apt-get update
# apt-get install elasticsearch

After update, had to reinstall license and marvel
# bin/plugin remove license
@booherbg
booherbg / gist:cc09bb8bc66fae56f60e
Last active June 27, 2017 15:06
Getting started with Tensor Flow (Installation)
@booherbg
booherbg / rails-apartment-notes.md
Last active August 29, 2015 14:26
Adding apartment to our api project
  1. add apartment to gemfile
  2. run initializer to generate config/apartment.rb
  3. Create our Event model (which maps to schemas)
  4. before_validate: create self.schema that uses .parameterize.underscore from self.name on event model
  5. after_create: create new apartment tenant on the event model
  6. Set up the config to ignore a few of our models that are public
  7. hard code the config to select a single event schema, for now
  8. migrate over all the data:
@booherbg
booherbg / unknown_protocol.md
Last active August 29, 2015 14:26
SSL unknown protocol -- python, ruby

Started having some strange behavior today.

My ruby deploy script (via mina) was crashing on irc notifications.

OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 state=unknown state: unknown protocol

Later in the day, a few of our client software scripts could only connect 2-at-a-time (when one would drop, a third would join in its place). When I dug into the guts of it, the python error message was:

@booherbg
booherbg / gist:e93ec212bf1255432717
Last active August 29, 2015 14:25
Google Chrome Pending network calls on html5 video -- fix

Google Chrome Pending video status

There's an outstanding bug in Google Chrome where video resources aren't properly closed after download, so the socket limit gets maxed and subsequent videos (and all ajax calls) hang. https://code.google.com/p/chromium/issues/detail?id=234779

I tried, with no success:

  • Removing the tag after unload (in an attempt to force the resource to be released)
@booherbg
booherbg / scifi-notes.md
Last active April 17, 2018 16:05
Notes on SciFi

This is just a general repository for me to keep track of books that I've read over the years.

2018

  • The Dosadi Experiment (1977), Frank Herbert
  • Snow Crash (1992), Neil Stephenson; This was a doozie. Excellent read.

2017

  • Devil in the White City (2003), Erik Larson
@booherbg
booherbg / metadata-examples.md
Last active August 29, 2015 14:20
Cool examples of meta data on Google

Interesting examples of meta data by Google

  1. Etymology Charts -- when searching for the history of a word, using "etymology" as a keyword in the search, we are presented with a chart that shows interesting information about the word (in this case, 'crass'). For example, I immediately learn that it comes from 'crassus', Latin for 'thick or dense'. I see that it stems from the late 15th century. There is also a graph showing the usage over time from the 1850s, likely based on references in scanned literature (my guess). As a side note, it would be fascinating to see different charts normalized against things like population growth, printing technology improvements, or whether it was driven by a true cultural shift, like an influx in population from one region to another (or, into American cities like Cincinnati), or usage in a popular play (that can reach more people now due to printing press innovations and, lat