Recipe Type: All Grain
Yeast: Red Star Montrachet
Yeast Starter: Nope
Additional Yeast or Yeast Starter: Nope
Batch Size (Gallons): 5
Recipe Type: All Grain
Yeast: Red Star Montrachet
Yeast Starter: Nope
Additional Yeast or Yeast Starter: Nope
Batch Size (Gallons): 5
JSdoc style comments for functions...
/**
and in entershift + return
=> inserts a new line and uses smart indentation to place the cursor
shift + command + u
=> toggles from upcase to downcase, and downcase to upcase
shift + option + u
=> toggles from snake to camel and camel to snake
Live Templates are Atom Snippets!
option + enter/return
=> intents will show possible actions to take on that item
(by @andrestaltz)
So you're curious in learning this new thing called (Functional) Reactive Programming (FRP).
Learning it is hard, even harder by the lack of good material. When I started, I tried looking for tutorials. I found only a handful of practical guides, but they just scratched the surface and never tackled the challenge of building the whole architecture around it. Library documentations often don't help when you're trying to understand some function. I mean, honestly, look at this:
Rx.Observable.prototype.flatMapLatest(selector, [thisArg])
Projects each element of an observable sequence into a new sequence of observable sequences by incorporating the element's index and then transforms an observable sequence of observable sequences into an observable sequence producing values only from the most recent observable sequence.
At the 2004 Ruby Conference, Jamis Buck had the unenviable task to explain Dependency Injection to a bunch of Ruby developers. First of all, Dependency Injection (DI) and Inversion of Control (IoC) is hard to explain, the benefits are subtle and the dynamic nature of Ruby make those benefits even more marginal. Furthermore examples using DI/IoC are either too simple (and don’t convey the usefulness) or too complex (and difficult to explain in the space of an article or presentation). I once attempted to explain DI/IoC to a room of Java programmers (see onestepback.org/articles/dependencyinjection/), so I can’t pass up trying to explain it to Ruby developers.
Thanks goes to Jamis Buck (the author of the Copland DI/IoC framework) who took the time to review this article and provide feedback.
http://www.amazon.com/The-Autobiography-Malcolm-Told-Haley/dp/0345350685
MALCOLM X
Born Malcolm Little on May 19, 1925, Malcolm X was one of the most articulate and powerful leaders of black America during the 1960s. A street hustler convicted of robbery in 1946, he spent seven years in prison, where he educated himself and became a disciple of Elijah Muhammad, founder of the Nation of Islam. In the days of the civil rights movement, Malcolm X emerged as the leading spokesman for black separatism, a philosophy that urged black Americans to cut political, social, and economic ties with the white community. After a pilgrimage to Mecca, the capital of the Muslim world, in 1964, he became an orthodox Muslim, adopted the Muslim name El Hajj Malik El-Shabazz, and distanced himself from the teachings of the black Muslims. He was assassinated in 1965. In the following excerpt from his autobiography (1965), coauthored with Alex Haley and published the year of his death, Malcolm X describes his self-education.
How would you optimize this for readability,fun...?
I need to return null
if the value
cannot be found for var lastName = contact.properties.lastname.value;
basically if a nested property doesn't exist... what are some cool ways to prevent "Cannot read prop X of undefined"
current solution:
There are quite a few OAuth solutions out there, but I want to share the one we use since it allows you to intelligently link multiple OAuth identities with a single user entity. If you use 90% of the code examples on the Internet you will wind up with a new user entity each time the user signs in with a different OAuth provider, and a bunch of very confused users.
The OAuth provider that throws a spanner in the works and adds convolution to our code is Twitter. Unlike other providers, Twitter doesn’t share their user’s email address, so we need to add an extra step to get it from the user. More info on that here.
Thanks to everyone who submitted comments and changes! For a list of code changes see here.
A quick word of warning: This isn’t a complete code example, it’s a hackers guide to using OmniAuth in Rails the right way. If you’re looking for a full fledged demo then there are plenty available on Github.
Basic Implementation So, without further ado, here is the code:
This was helpful.
meal.rb
class Meal < ActiveRecord::Base
as_enum :type, [:breakfast, :brunch, :lunch, :dinner]
end
var fs = require('fs') | |
var path = require('path') | |
var express = require('express') | |
var app = express(); | |
app.use(express.static(path.join(__dirname, 'public'))); | |
app.get('*', function(req, res){ | |
res.pipe(fs.createReadStream(path.join(__dirname, 'public', 'index.html'))) |
npm overview, package.json, npm "scripts" and "bin" settings, publishing to npm, private modules, commonjs and es6
What is a Node Module
How Can You Make a Node Module?