App.IndexRoute = Ember.Route.extend({
model: function() {
return Ember.Object.create({name: 1})
},
setupController: function(controller, model) { // 他省略了setupController
controller.set('model', model) // 这里的model就是上面的 Ember.Object.create({name: 1})
controller.set('age', 2) // 模板里面 {{age}}
}
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
Fri Mar 7 19:24:27 2014 OpenVPN 2.3.2 x86_64-unknown-linux-gnu [SSL (OpenSSL)] [LZO] [EPOLL] [eurephia] [MH] [IPv6] built on Nov 13 2013 | |
Fri Mar 7 19:24:27 2014 WARNING: No server certificate verification method has been enabled. See http://openvpn.net/howto.html#mitm for more info. | |
Fri Mar 7 19:24:27 2014 Control Channel Authentication: tls-auth using INLINE static key file | |
Fri Mar 7 19:24:27 2014 Outgoing Control Channel Authentication: Using 160 bit message hash 'SHA1' for HMAC authentication | |
Fri Mar 7 19:24:27 2014 Incoming Control Channel Authentication: Using 160 bit message hash 'SHA1' for HMAC authentication | |
Fri Mar 7 19:24:27 2014 Socket Buffers: R=[212992->131072] S=[212992->131072] | |
Fri Mar 7 19:24:27 2014 UDPv4 link local: [undef] | |
Fri Mar 7 19:24:27 2014 UDPv4 link remote: [AF_INET]68.68.33.126:123 | |
Fri Mar 7 19:24:27 2014 TLS: Initial packet from [AF_INET]68.68.33.126:123, sid=dd58390e 0e1906fb | |
Fri Mar 7 19:24:30 2014 VERIFY OK: depth=1, C=US, ST=CA, L=San-Francisco, O=reliablehosting.co |
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
# | |
# without strongvpn, direct connect | |
# | |
/tmp ❯ wget http://www.engadget.com/ | |
--2014-03-07 20:23:07-- http://www.engadget.com/ | |
Resolving www.engadget.com (www.engadget.com)... 207.200.74.123 | |
Connecting to www.engadget.com (www.engadget.com)|207.200.74.123|:80... connected. | |
HTTP request sent, awaiting response... 200 OK | |
Length: unspecified [text/html] |
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
Started GET "/api/v1/channels?featured=true&auth_token=BzbsZNWneZPToi95GryR&channel_id=-1" for 127.0.0.1 at 2014-03-24 11:38:28 +0800 | |
Processing by Api::V1::ChannelsController#index as JSON | |
Parameters: {"featured"=>"true", "auth_token"=>"BzbsZNWneZPToi95GryR", "channel_id"=>"-1"} | |
User Load (1.3ms) SELECT "users".* FROM "users" WHERE "users"."authentication_token" = 'BzbsZNWneZPToi95GryR' LIMIT 1 | |
(0.3ms) BEGIN | |
SQL (0.9ms) UPDATE "users" SET "last_sign_in_at" = $1, "current_sign_in_at" = $2, "sign_in_count" = $3, "updated_at" = $4 WHERE "users"."id" = 2 [["last_sign_in_at", Mon, 24 Mar 2014 03:38:28 UTC +00:00], ["current_sign_in_at", Mon, 24 Mar 2014 03:38:28 UTC +00:00], ["sign_in_count", 865], ["updated_at", Mon, 24 Mar 2014 03:38:28 UTC +00:00]] | |
(3.2ms) COMMIT | |
Channel Load (1.2ms) SELECT "channels".* FROM "channels" WHERE "channels"."featured" = 't' AND (author_id = 2 OR (accessible_to_all = 't' AND approved = 't')) | |
Page Load (0.7ms) SELECT "pages".* FROM "pages" WHERE "pages"."channe |
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
a = function() { | |
console.log(1) | |
} | |
a() // run it | |
console.log(2) | |
// 同步的 结果是 | |
// 1 | |
// 2 |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset=utf-8 /> | |
<title>Ember Hello</title> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> | |
<script src="http://builds.handlebarsjs.com.s3.amazonaws.com/handlebars-v1.3.0.js"></script> | |
<script src="http://builds.emberjs.com/tags/v1.4.0/ember.min.js"></script> | |
</head> | |
<body> |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset=utf-8 /> | |
<title>Ember Hello</title> | |
<script | |
src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> | |
<script src="http://builds.handlebarsjs.com.s3.amazonaws.com/handlebars-v1.3.0.js"></script> | |
<script src="http://builds.emberjs.com/tags/v1.4.0/ember.min.js"></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
# a.gemspec | |
require "bundler" | |
Gem::Specification.new do |s| | |
s.name = "hello" | |
.... | |
s.add_bundler_dependencies | |
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
Original Source: https://github.com/chneukirchen/styleguide | |
= Christian Neukirchen's Ruby Style Guide | |
You may not like all rules presented here, but they work very well for | |
me and have helped producing high quality code. Everyone is free to | |
code however they want, write and follow their own style guides, but | |
when you contribute to my code, please follow these rules: | |
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
(process:9963): Gtk-WARNING **: Locale not supported by C library. | |
Using the fallback 'C' locale. | |
(qq:9963): GdkPixbuf-CRITICAL **: gdk_pixbuf_add_alpha: assertion `GDK_IS_PIXBUF (pixbuf)' failed | |
(qq:9963): GdkPixbuf-CRITICAL **: gdk_pixbuf_copy_area: assertion `src_pixbuf != NULL' failed | |
(qq:9963): GdkPixbuf-CRITICAL **: gdk_pixbuf_copy_area: assertion `src_pixbuf != NULL' failed | |
(qq:9963): GdkPixbuf-CRITICAL **: gdk_pixbuf_copy_area: assertion `src_pixbuf != NULL' failed |
OlderNewer