This file contains hidden or 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
| import Ember from 'ember'; | |
| export default Ember.Component.extend({ | |
| didInsertElement() { | |
| this._super(...arguments); | |
| Ember.$.getScript('https://d2xwmjc4uy2hr5.cloudfront.net/im-embed/im-embed.min.js'); | |
| }, | |
| didRender() { | |
| console.log(Ember.$('.im-checkout a')); | |
| } |
This file contains hidden or 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
| const pages = [ | |
| { | |
| image: "URL", // a 1x1 grid image | |
| cells: [ | |
| { | |
| x: 0, | |
| y: 0, | |
| width: 100% | |
| } | |
| ] |
This file contains hidden or 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 chosen-jquery | |
| UiControls = window.UiControls || Ember.Namespace.create(); | |
| /** | |
| * Custom Multi-Select enabled with 'chosen' | |
| * @class | |
| * @memberOf UiControls | |
| * @extends Ember.Select | |
| * |
This file contains hidden or 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 bootstrap-switch | |
| UiControls = window.UiControls || Ember.Namespace.create(); | |
| /** | |
| * Custom iPhone style ON-OFF switch control | |
| * | |
| * @class | |
| * @memberOf UiControls | |
| * @extends Ember.View |
This file contains hidden or 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
| UiControls = window.UiControls || Ember.Namespace.create(); | |
| /** | |
| * A MaxLength UI Control | |
| * It extends your regular INPUT[type='text'] & TEXTAREA fields | |
| * to support a character count on them | |
| * | |
| * @class | |
| * @memberOf UiControls | |
| * @extends Ember.View |
This file contains hidden or 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
| RedactorView = Ember.View.extend({ | |
| templateName: 'redactor', | |
| didInsertElement: function () { | |
| require('editor/vendor/redactor/redactor'); | |
| // If 'css' is not injected yet, inject it. | |
| if (!Utils.hasCss('css/redactor.css')) { | |
| $('head').append('<link rel="stylesheet" href="css/redactor.css" type="text/css" />'); | |
| } |
This file contains hidden or 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
| # @option options [Boolean] :string If true, compiles the output as | |
| # a String instead of a closure. This means that @sourceURL can be | |
| # appended for good stack traces and debugging. |
This file contains hidden or 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
| + set -e | |
| ++ dirname scripts/build.sh | |
| + ROOT=scripts/../ | |
| + cd scripts/../externals/libfbjs | |
| + make | |
| g++ -fPIC -Wall -DNOT_FBMAKE=1 -ggdb -g -O0 -DDEBUG -c -o parser.yacc.o parser.yacc.cpp | |
| g++ -fPIC -Wall -DNOT_FBMAKE=1 -ggdb -g -O0 -DDEBUG -c -o node.o node.cpp | |
| /usr/include/c++/4.2.1/ext/ropeimpl.h: In static member function ‘static typename __gnu_cxx::rope<_CharT, _Alloc>::_RopeLeaf* __gnu_cxx::rope<_CharT, _Alloc>::_S_leaf_concat_char_iter(__gnu_cxx::_Rope_RopeLeaf<_CharT, _Alloc>*, const _CharT*, size_t) [with _CharT = char, _Alloc = std::allocator<char>]’: | |
| /usr/include/c++/4.2.1/ext/ropeimpl.h:675: instantiated from ‘static typename __gnu_cxx::rope<_CharT, _Alloc>::_RopeRep* __gnu_cxx::rope<_CharT, _Alloc>::_S_concat(__gnu_cxx::_Rope_RopeRep<_CharT, _Alloc>*, __gnu_cxx::_Rope_RopeRep<_CharT, _Alloc>*) [with _CharT = char, _Alloc = std::allocator<char>]’ | |
| /usr/include/c++/4.2.1/ext/rope:2763: instantiated from ‘__gnu_cxx::rope<_CharT, _Alloc> __gnu_cxx::operator+(const __gnu_cxx::rope<_CharT, _Alloc>&, |
This file contains hidden or 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 fn = function() { | |
| var dfd = new Deferred(); | |
| var promises = []; | |
| promises.push(async1()); // an async operation | |
| promises.push(async2()); // an async operation | |
| promises.push(sync1()); // a sync operation | |
| promises.push(async3()); // an async operation | |
| // You want to perform some computation after above 4 tasks are done. |
NewerOlder