Skip to content

Instantly share code, notes, and snippets.

View tensiondriven's full-sized avatar

Jonathan Yankovich tensiondriven

View GitHub Profile
iOS 10.1.1
This update includes Portrait Camera for iPhone 7 Plus (beta), transit directions for Japan, stability improvements and bug fixes.
iOS 10.1.1 introduces new features and improvements including:
Camera and Photos
• Introduces Portrait Camera for iPhone 7 Plus that creates a depth effect that keeps your subject sharp while creating a beautifully blurred background (beta)
• People names in the Photos app are saved in iCloud backups
@tensiondriven
tensiondriven / gist:04a36f9deb84b7823296cda1c89d42f4
Last active August 14, 2016 22:36
Elm complier confusing error?

I have the following model and update function:

type alias Model =
  { people: List String
  , entry: String
  }

model : Model
model =
[error] #PID<0.6158.0> running Checklist.Endpoint terminated
Server: localhost:4000 (http)
Request: GET /questions
** (exit) an exception was raised:
** (Protocol.UndefinedError) protocol Enumerable not implemented for %Checklist.Question{__meta__: #Ecto.Schema.Metadata<:loaded>, answers: #Ecto.Association.NotLoaded<association :answers is not loaded>, body: nil, gender: "A", id: 1007, parent_id: 1, questions: #Ecto.Association.NotLoaded<association :questions is not loaded>, title: "Abrasion", user: #Ecto.Association.NotLoaded<association :user is not loaded>, user_id: 1}
(elixir) lib/enum.ex:1: Enumerable.impl_for!/1
(elixir) lib/enum.ex:116: Enumerable.reduce/3
(elixir) lib/enum.ex:1477: Enum.reduce/3
(checklist) Checklist.Router.Helpers.segments/3
(checklist) web/router.ex:1: Checklist.Router.Helpers.question_path/3
@tensiondriven
tensiondriven / gist:6944426
Created October 12, 2013 01:10
Store a model in a Mongoid field using YAML
class YamlType
def mongoize
YAML.dump(object)
end
class << self
def mongoize(object)
YAML.dump(object)
@tensiondriven
tensiondriven / gist:6546677
Last active December 22, 2015 23:29
/usr/local/etc/mongod.conf
# Store data in /usr/local/var/mongodb instead of the default /data/db
dbpath = /usr/local/var/mongodb
# Append logs to /usr/local/var/log/mongodb/mongo.log
logpath = /usr/local/var/log/mongodb/mongo.log
logappend = true
# Only accept local connections
bind_ip = 127.0.0.1
struct test_struct
{
int val;
struct test_struct *next;
};
1. Draw a circle on a piece of paper.
2. Think about someone in your life that you respect, perhaps thinking about your more exotic friends on facebook who you seldom see, but respect deeply.
3. Draw 4" circle on a piece of 8.5x11 paper
4. Write their name at about 2 oclick from the circle. (You'll write up to 5 peoples names around the circle total.)
5. Think about someone else in your life that you respect in a similar way.
6. Write their name around the circle.
7. Think about the values they share. Try to come up with a single value or guiding force that you think these people share, that you respect.
8. Continue thinking about people and writing them down, up to 5.
9. As soon as you know the value these people share, write it in the circle.
10. Repeat for 2 other values that you hold near.
8:11 you write the names of people dear to you (and why) and you keep writing names of people and they extend outwards from the circle
8:11 at some point, you just draw a line and say "these people I'll spend more time with, the rest are distractions"
8:12 and sometimes that means cutting people out of your life
8:12 - time - is - finite -

Homework for April 9th

  1. Write your first rails app
  • Create the Movies app using rails.
  • Start with the command:
    • rails new rails-movies
  1. Create your controller:
    • rails g controller movie
  1. Create ONE or TWO models, ie for movies and searches:
  • app/models/movie.rb - This is a class for a movie.
What is the best methodologies to follow to debug (e.g. using binding pry, splitting complex functions into multiple steps to see where the code is breaking, etc)?
How do we apply TDD more effectively? The TDD example seemed more of a Ruby logic exercise than a TDD exercise.
What is a good strategy for setting up your html when you get a webpage design, i.e. how do we set up our divs, layouts, etc."
"What's the best workflow to use in Git? For smaller teams, and for larger teams? How does the team workflow tie into Github? This is especially important if we're going to start creating group projects.
How can we best utilize Git to keep version control under, well, control?