This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Batch find for Ember Data. It will coerce all the finds on the same run loop | |
// and execute a single batch find for all the records. It mimics the find | |
// semantics. | |
// | |
// Example usage: | |
// | |
// var user1 = store.find('user', 1); | |
// var user2 = store.find('user', 2); | |
// | |
// user1.then(function(user){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<link rel="import" href="../components/polymer/polymer.html"> | |
<polymer-element name="my-element"> | |
<template> | |
<style> | |
</style> | |
</template> | |
<script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gem 'rack-cors' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source 'http://rubygems.org' | |
gem 'rails', :git=>'git://github.com/rails/rails.git', :branch=>'3-0-stable' | |
gem 'arel', :git=>'git://github.com/rails/arel.git' | |
gem "compass", ">= 0.10.5" | |
gem "haml" | |
gem "will_paginate", "3.0.pre2" | |
gem "devise"#, :git=>'git://github.com/plataformatec/devise.git' | |
gem "devise_invitable", :git=>"git://github.com/scambra/devise_invitable.git" | |
gem "high_voltage" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'formula' | |
class Vim <Formula | |
url 'ftp://ftp.vim.org/pub/vim/unix/vim-7.3.tar.bz2' | |
homepage 'http://www.vim.org/' | |
md5 '5b9510a17074e2b37d8bb38ae09edbf2' | |
version '7.3.112' | |
def patchlevel; 112 end | |
def features; %w(tiny small normal big huge) end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'formula' | |
require 'hardware' | |
class Qt < Formula | |
url 'http://get.qt.nokia.com/qt/source/qt-everywhere-opensource-src-4.7.3.tar.gz' | |
md5 '49b96eefb1224cc529af6fe5608654fe' | |
homepage 'http://qt.nokia.com/' | |
head 'git://gitorious.org/qt/qt.git', :branch => 'master-stable' | |
def options |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rvm uninstall 1.9.2 | |
wget https://gist.github.com/raw/1156873/6343983e3ac418b3f0f59e9b3c38a5a5e5b0915a/gistfile1.sh -O - | sh | |
rvm gemset use global | |
gem install bundler | |
rvm reload |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def pending_notifications | |
notifications = self.notifications | |
if last_notification_read_at | |
# Sqlite doesn't properly compare dates because doesn't have a dedicated | |
# type for it. | |
# TODO: Investigate further and find a better solution for this. | |
# | |
time_restriction = if connection.class.name.demodulize =~ /SQLite/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var model = new Backbone.Model.extend(); | |
// The form would bind to the model's "error" event. | |
// Any error retrieved from the JSON response or js | |
// validations would be captured. | |
// | |
// Sending the form would simply call the model's | |
// 'save' function with its serialized attributes | |
// and therefore would either render the errors or | |
// fire up the 'success' callback. |
OlderNewer