Skip to content

Instantly share code, notes, and snippets.

" =====================================================================
" Initialize: {{{1
set nocp
filetype plugin indent on
set runtimepath^=~/.vim/bundle/ctrlp.vim
syntax on
set wildignore+=*/tmp/*,*/log/*,*/pg_dumps/*,*.so,*.swp,*.zip,*.png,*.jpg,*/public/*,*/chef/*,*/vendor/*,*/node_modules/* " MacOSX/Linux
EmberJS/TodoMVC/Adding200Items/Sync : 1702.346000005491 ms
EmberJS/TodoMVC/Adding200Items/Async : 25.54499999678228 ms
EmberJS/TodoMVC/CompletingAllItems/Sync : 7.547000001068227 ms
EmberJS/TodoMVC/CompletingAllItems/Async : 283.12500000174623 ms
EmberJS/TodoMVC/DeletingItems/Sync : 1343.2750000065425 ms
EmberJS/TodoMVC/DeletingItems/Async : 11.830000003101304 ms
EmberJS/TodoMVC : 3373.6680000147317 ms
React/TodoMVC/Adding200Items/Sync : 874.4910000095842 ms
Delivered-To: reply+6e6e943ffdf89039b9abf4d3f35e320d@discourse.org
Received: by 10.76.68.164 with SMTP id x4csp9950oat;
Wed, 20 Nov 2013 09:37:45 -0800 (PST)
X-Received: by 10.236.77.231 with SMTP id d67mr1031178yhe.113.1384969065068;
Wed, 20 Nov 2013 09:37:45 -0800 (PST)
Return-Path: <robin.ward@gmail.com>
Received: from mail-ie0-x236.google.com (mail-ie0-x236.google.com [2607:f8b0:4001:c03::236])
by mx.google.com with ESMTPS id d49si17069878yhn.5.2013.11.20.09.37.44
for <reply+6e6e943ffdf89039b9abf4d3f35e320d@discourse.org>
It's hard to answer these in a tweet :)
You can't pass arguments to computed properties unless you are creating custom setters, but that's a whole different topic!
What you probably want to do here is use an itemController for each row you are displaying (with the button.)
{{#each thing in things itemController="thing"}}
<button {{bindAttr disabled=thing.disabled}}>button</button>
{{/each}}
Discourse.debouncePromise = function(func, wait) {
var timeout = null;
return function() {
var context = this;
var args = arguments;
// Return a promise that is never executed
if (timeout) return Ember.Deferred.create();
gem "omniauth-appnet"
gem "omniauth-box"
gem "omniauth-clef"
gem "omniauth-deviantart"
gem "omniauth-dropbox"
gem "omniauth-ebay"
gem "omniauth-flickr"
gem "omniauth-fitbit"
gem "omniauth-flattr"
gem "omniauth-foursquare"
en:
try_discourse:
system_messages:
usage_tips:
text_body_template: |
WELCOME TO TRY OMG!!!?!?!!?!?
This private message has a few quick tips to get you started:
# Keep everything in a database transaction
Player.transaction do
# Find the player's current goal
goal = player.current_goal
# Make sure we don't reward goals that have been already been completed
unless goal.completed?
goal.update_column :completed, true
player.score += goal.score
@eviltrout
eviltrout / nntp_connection.rb
Created December 19, 2012 15:35
NNTP Connection Class in Ruby
#
# Example usage:
#
# require 'rubygems'
# require 'date'
# require 'socket'
# require 'celluloid'
# require 'nntp_connection'
#
# nntp = NNTPConnection.new('news.supernews.com', 119, 'username', 'password')
@eviltrout
eviltrout / gist:3835764
Created October 4, 2012 19:12
#unboundIf and #unboundUnless in Ember
Ember.Handlebars.registerHelper 'unboundIf', (property, options) ->
context = (options.contexts && options.contexts[0]) || this
normalized = Ember.Handlebars.normalizePath(context, property, options.data)
if (Ember.get(normalized.root,normalized.path,options))
return options.fn(context,property)
else
return options.inverse(context,property)
Ember.Handlebars.registerHelper 'unboundUnless', (property, options) ->