- update docs that use {{#each controller}} to {{#each model}} and/or explain the difference.
- assert errors or log debug info when templates reference undefined attributes in development
- need larger project examples of ember in live use for a production application. docs are inconsistent and too shallow on scope
- Horrible gotchya: Passing a second argument to {{render}} creates a new controller (like {{control}} would) rather than reusing the existing one (without warning or documentation). This makes perfect sense once you understand it, but there's no indication that this is happening except that properties you set on the controller are missing. I'd love a developer mode that tells you everything Ember is generating silently for you (controllers, routes, new instances, missing attributes, etc)
- defining a route with nothing in it is not the same as the auto generated one (it overwrites the default setupController or model?). No ideas why.
- attributes absolutely need a readOn
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
# IOT/sensor2/temp | |
env,type=A temp=23.39 | |
env,type=B temp=40.00 | |
# IOT/sensor1/acc | |
env,type=A x=0.2 | |
env,type=B x=1.3 |
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
diff --git a/cmd/gotext/common.go b/cmd/gotext/common.go | |
index 51322db..03e85db 100644 | |
--- a/cmd/gotext/common.go | |
+++ b/cmd/gotext/common.go | |
@@ -6,16 +6,6 @@ package main | |
import ( | |
"fmt" | |
- "go/build" | |
- "go/parser" |
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
// First make sure the wrapper app is loaded | |
document.addEventListener("DOMContentLoaded", function() { | |
// Then get its webviews | |
let webviews = document.querySelectorAll(".TeamView webview"); | |
// Fetch our CSS in parallel ahead of time | |
const cssPath = 'https://raw.githubusercontent.com/Nockiro/slack-black-theme/master/custom.css'; | |
let cssPromise = fetch(cssPath).then(response => response.text()); |
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
upstream unicorn { | |
server unix:/var/run/.unicorn.sock fail_timeout=0; | |
} | |
server { | |
listen 80 default_server deferred; | |
server_name example.com; | |
root /home/username/apps/projectname/current/public; | |
location ^~ /assets/ { |
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
#!/bin/sh | |
### BEGIN INIT INFO | |
# Provides: unicorn | |
# Required-Start: $remote_fs $syslog | |
# Required-Stop: $remote_fs $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Manage unicorn server | |
# Description: Start, stop, restart unicorn server for a specific application. | |
### END INIT INFO |
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
App.User = DS.Model.extend | |
name: DS.attr 'string' | |
email: DS.attr 'string' | |
# dynamically defined properties are serialized as a string of JSON here: | |
optionsString: DS.attr 'string' | |
# optionsData lets us deal with the string as a JSON object | |
optionsData: ((k,v) -> | |
if arguments.length == 2 | |
@set('optionsString', JSON.stringify(v)) |
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
module StateMachine | |
def self.included(klass) | |
klass.send(:extend, ClassMethods) | |
klass.instance_eval do | |
after_initialize :set_initial_state | |
end | |
end | |
module ClassMethods | |
def state_column |
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
App.SortedElementsView = Ember.View.extend Ember.TargetActionSupport, | |
target: Ember.computed.alias('controller') | |
action: 'sort' | |
classNames: ['sorted-elements'] | |
attributeBindings: ['id', 'fields'] | |
elementClass: 'sortable-element' | |
didInsertElement: () -> | |
elements = ".#{@get('elementClass')}" | |
Em.run.next () => | |
hookupSortable = () => |
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
# given eye color distribution from: | |
# http://www.statisticbrain.com/eye-color-distribution-percentages/ | |
# ignoring the yellow specs, basically: | |
# blue 32%, green 12%, brown 41% = 85% | |
# thus.. | |
# blue 38%, green 14%, brown 48% = 100% | |
# | |
# also given the image from here.. | |
# https://twitter.com/scienceporn/status/322099933484314624 | |
# |
NewerOlder