(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
# Rails 3.2 support for HTTP PATCH. | |
if Rails::VERSION::MAJOR < 4 | |
# see http://weblog.rubyonrails.org/2012/2/26/edge-rails-patch-is-the-new-primary-http-method-for-updates/ | |
# https://github.com/rails/rails/pull/505 | |
ActionDispatch::Routing::Mapper::HttpHelpers.module_eval do | |
# Define a route that only recognizes HTTP PATCH. | |
# For supported arguments, see <tt>Base#match</tt>. | |
# | |
# Example: |
I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!
\
Consider the example:
var MyObject = Ember.Object.extend({
selectedContent: Ember.computed.filterBy('content', 'isSelected')
});
var obj = MyObject.create({
content: [
Em.Object.create({name: "one", isSelected: false}),
Em.Object.create({name: "two", isSelected: false})
echo "Checking for requirements:" | |
if [ -d "/Applications/Xcode.app/Contents/Developer" ]; then | |
XCODE_FOUND=true | |
echo "\t✓ Found Xcode.app." | |
else | |
echo "\t✗ Missing Xcode.app. Install it from the App Store." | |
echo "In Terminal? Command + Double click to open Xcode.app in the Mac App Store." | |
echo "http://appstore.com/mac/xcode" | |
exit 1 |
This entire guide is based on an old version of Homebrew/Node and no longer applies. It was only ever intended to fix a specific error message which has since been fixed. I've kept it here for historical purposes, but it should no longer be used. Homebrew maintainers have fixed things and the options mentioned don't exist and won't work.
I still believe it is better to manually install npm separately since having a generic package manager maintain another package manager is a bad idea, but the instructions below don't explain how to do that.
Installing node through Homebrew can cause problems with npm for globally installed packages. To fix it quickly, use the solution below. An explanation is also included at the end of this document.
This plugin got promoted to its own repository.
# A user session class, a simplified mix of the following code samples: | |
# * https://github.com/blog/1661-modeling-your-app-s-user-session | |
# * http://www.jonathanleighton.com/articles/2013/revocable-sessions-with-devise/ | |
class Session < ActiveRecord::Base | |
# Uncomment if you use Hobo Fields, else add these yourself | |
# fields do | |
# session_id :string, :index => true, :unique => true | |
# accessed_at :datetime | |
# user_ip :string |
#!/bin/bash | |
## List all manually installed packages on a debian/ubuntu system | |
## manually installed means: | |
## 1. not pre-installed with the system | |
## 2. not marked auto-installed by apt (not dependencies of other | |
## packages) | |
## Note: pre-installed packages that got updated still needs to be | |
## filtered out. |
# Install dependencies | |
# | |
# * checkinstall: package the .deb | |
# * libpcre3, libpcre3-dev: required for HTTP rewrite module | |
# * zlib1g zlib1g-dbg zlib1g-dev: required for HTTP gzip module | |
apt-get install checkinstall libpcre3 libpcre3-dev zlib1g zlib1g-dbg zlib1g-dev && \ | |
mkdir -p ~/sources/ && \ | |
# Compile against OpenSSL to enable NPN |