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
t = Teacher.last | |
Notification.create user: t, thing: Content.last, message: 'last', url: '/' |
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
# .where("comments.creator_type = 'User' AND threads.commontable_type = 'Discussion'") | |
# .where(topics: {archived_at: nil}, archived_at: nil) | |
@discussions = current_user.discussions | |
.joins(:comments) | |
.order('commontator_comments.created_at DESC') | |
# .includes(:topic, :thread) | |
@discussions.each{|discussion| commontator_thread_show(discussion)} | |
@discussions = @discussions.group_by{|d| current_user.time(d.created_at).to_date } |
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
Array.prototype.value = function(val) { | |
for (var i = 0; i < this.length; i++) { | |
var e = this[i]; | |
if(e[1] == val) return e; | |
} | |
}; | |
// p = console.log; | |
c = console.log; | |
p = function() {}; |
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
function mutation(arr) { | |
for(i=0;i < arr[1].length; i++){ | |
if(arr[0].toLowerCase().indexOf(arr[1][i].toLowerCase()) == -1 ) return false; | |
} | |
return true; | |
} | |
mutation(['hello', 'hey']); | |
// ver 2 |
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
some |
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
81: EnrollmentsMailer.new(Enrollment.first.id, '123').deliver_later | |
86: AssignmentsMailer.new(Assignment.first.id, Student.first.id).deliver_later |
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
ArgumentError - wrong number of arguments (1 for 0): | |
() home/pills/.rvm/gems/ruby-2.2.1/bundler/gems/activeadmin-cef68b7be826/lib/active_admin/view_helpers/display_helper.rb:30:in `display_name_method_for' | |
() home/pills/.rvm/gems/ruby-2.2.1/bundler/gems/activeadmin-cef68b7be826/lib/active_admin/view_helpers/display_helper.rb:18:in `display_name' | |
() home/pills/.rvm/gems/ruby-2.2.1/bundler/gems/activeadmin-cef68b7be826/lib/active_admin/view_helpers/breadcrumb_helper.rb:18:in `block in breadcrumb_links' | |
() home/pills/.rvm/gems/ruby-2.2.1/bundler/gems/activeadmin-cef68b7be826/lib/active_admin/view_helpers/breadcrumb_helper.rb:11:in `breadcrumb_links' | |
arbre (1.0.3) lib/arbre/element.rb:180:in `method_missing' | |
() home/pills/.rvm/gems/ruby-2.2.1/bundler/gems/activeadmin-cef68b7be826/lib/active_admin/views/title_bar.rb:34:in `build_breadcrumb' | |
() home/pills/.rvm/gems/ruby-2.2.1/bundler/gems/activeadmin-cef68b7be826/lib/active_admin/views/title_bar.rb:17:in `block in build_titlebar_left' | |
arbre (1 |
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
/* | |
* robotMaze.js | |
* | |
* The blue key is inside a labyrinth, and extracting | |
* it will not be easy. | |
* | |
* It's a good thing that you're a AI expert, or | |
* we would have to leave empty-handed. | |
*/ |
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
> [email protected] install /home/pills/.nvm/versions/io.js/v2.3.1/lib/node_modules/iron-meteor/node_modules/fibers | |
> node ./build.js | |
child_process: customFds option is deprecated, use stdio instead. | |
make: Entering directory `/home/pills/.nvm/versions/io.js/v2.3.1/lib/node_modules/iron-meteor/node_modules/fibers/build' | |
CXX(target) Release/obj.target/fibers/src/fibers.o | |
../src/fibers.cc: In function ‘v8::Handle<v8::Signature> uni::NewSignature(v8::Isolate*, v8::Handle<v8::FunctionTemplate>, int, v8::Handle<v8::FunctionTemplate>*)’: | |
../src/fibers.cc:132:54: error: no matching function for call to ‘v8::Signature::New(v8::Isolate*&, v8::Handle<v8::FunctionTemplate>&, int&, v8::Handle<v8::FunctionTemplate>*&)’ | |
return Signature::New(isolate, receiver, argc, argv); | |
^ |
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
$([[".card-number", 4242424242424242], [".card-expiry-month", '01'], [".card-expiry-year", '2020'], [".card-cvc", '123']]).each(function(i,e){$(e[0]).val(e[1])}) |