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
def self.create_for_referral_viewed(referral)
first_or_create({
user: referral.opportunity.owner,
name: 'view',
actable: referral,
actor: referral.redeemed_by # may be nil, can't count on it being there
})
end
# Hey Jose - should first_or_create take some criteria? What criteria is this using?
<h1>Your browser is not supported</h1>
<p>To give our users the best experience, we only allow Chrome, Firefox and Safari.</p>
<p> Please download one of these browsers using the following links:</p>
<ul>
<li> <a href='http://google.com/chrome'>Download Chrome</a> (Preferred)
<li> <a href='http://www.apple.com/safari/'>Download Safari</a>
<li> <a href='http://www.mozilla.org/en-US/firefox/new/'>Download Firefox</a>
</ul>
@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;
};
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 -
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.