Skip to content

Instantly share code, notes, and snippets.

View ananyo2012's full-sized avatar
🎯
Focusing

Ananya Maiti ananyo2012

🎯
Focusing
View GitHub Profile
@ananyo2012
ananyo2012 / rss_snippet_1.js
Created July 3, 2016 06:50
Code snippet for parsing rss feed
$.each($(feed).find('channel item'), function (i, item) {
title = $(item).find('title').html(),
description = $(item).find('description').html();
// Rendering code goes here
})
@ananyo2012
ananyo2012 / jQuery_get.js
Created July 3, 2016 06:48
Sample snippet for jQuery.get() method
$.get('https://mapknitter.org/feeds/author/waren', function (feed) {
// processing code goes here
})
@ananyo2012
ananyo2012 / database.yml
Created July 3, 2016 06:44
Rails database.yml example
default: &default
adapter: mysql2
encoding: utf8
pool: 5
username:
password:
socket: /var/run/mysqld/mysqld.sock
development:
<<: *default
@ananyo2012
ananyo2012 / typeahead_example.js
Last active July 3, 2016 05:52
Typeahead example
$('#questions_searchform_input').typeahead({
items: 15,
minLength: 3,
source: function (query, process) {
return $.post('/questions_search/typeahead/' + query, {}, function (data) {
return process(data);
})
},
updater: function(item) {
var url;
@ananyo2012
ananyo2012 / error.md
Created March 31, 2016 10:46
Tests on plots2
Loaded suite /home/ananyo/.rvm/gems/ruby-2.1.2/gems/rake-10.5.0/lib/rake/rake_test_loader
Started
E
================================================================================================================================================
Error: test_should_not_save_comment_without_body(DrupalCommentTest): ActiveRecord::StatementInvalid: SQLite3::ConstraintException: NOT NULL constraint failed: comments.thread: INSERT INTO "comments" ("uid", "nid", "status", "comment") VALUES (1, 1, 1, 'This thing is rad.')
================================================================================================================================================
E
================================================================================================================================================
Error: test_should_scan_callouts_out_of_body(DrupalCommentTest): ActiveRecord::StatementInvalid: SQLite3::ConstraintException: NOT NULL constraint failed: comments.thread: INSERT INTO "comments" ("uid", "nid",