Skip to content

Instantly share code, notes, and snippets.

View abishekrsrikaanth's full-sized avatar
🏠
Working from home

Abishek R Srikaanth abishekrsrikaanth

🏠
Working from home
View GitHub Profile
@abishekrsrikaanth
abishekrsrikaanth / javascript_resources.md
Last active August 29, 2015 14:12 — forked from jookyboi/javascript_resources.md
Here are a set of libraries, plugins and guides which may be useful to your Javascript coding.

Libraries

  • jQuery - The de-facto library for the modern age. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.
  • Backbone - Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
  • AngularJS - Conventions based MVC framework for HTML5 apps.
  • Underscore - Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects.
  • lawnchair - Key/value store adapter for indexdb, localStorage
@abishekrsrikaanth
abishekrsrikaanth / 0_reuse_code.js
Last active August 29, 2015 14:12
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
// =========================================================
// Iron.io MQ
// =========================================================
IronMqRestClient ironMq = IronSharp.IronMQ.Client.New();
//// Get a Queue object
QueueClient queue = ironMq.Queue("my_queue");
QueueInfo info = queue.Info();
{
"USD": {
"symbol": "$",
"name": "US Dollar",
"symbol_native": "$",
"decimal_digits": 2,
"rounding": 0,
"code": "USD",
"name_plural": "US dollars"
},
@abishekrsrikaanth
abishekrsrikaanth / country_currency.json
Last active August 29, 2015 14:04
Country to Currency Mapping
[
{
"country": "Afghanistan",
"country_code": "AF",
"currency_code": "USD",
"currency_name": "Afghani"
},
{
"country": "Albania",
"country_code": "AL",
var Order = sequelize.define('Order',{
sale_net_price: Sequelize.DECIMAL(10, 2),
},{
underscored: true,
freezeTableName: true,
tableName: 'orders'
});
var Transaction = sequelize.define('Transaction',{
order_id: Sequelize.INTEGER,
var Intimidate = require('intimidate');
var s3Uploader = function(options) {
try {
this.client = new Intimidate(options);
} catch (e) {
return null;
}
};
var AWS = require('aws-sdk');
AWS.config.update({accessKeyId: '{my_access_id}', secretAccessKey: '{my_secret_key}'});
var s3 = new AWS.S3();
var params = {
Bucket: 'bucket_name',
Key: key,
ACL: 'public-read',
Body: file_name
};
C:\Users\Abishek\Documents\GitHub\sequelize>mocha -g "updates with function and column value" -t 10000 test/dao-factory-test.js
C:\Users\Abishek\AppData\Roaming\npm\node_modules\mocha\bin\_mocha:432
if (!files.length) throw new Error("cannot resolve path (or pattern) '"
^
Error: cannot resolve path (or pattern) 'test/dao-factory-test.js'
at lookupFiles (C:\Users\Abishek\AppData\Roaming\npm\node_modules\mocha\bin\_mocha:432:32)
at runAgain (C:\Users\Abishek\AppData\Roaming\npm\node_modules\mocha\bin\_mocha:284:24)
at Array.forEach (native)
at Object.<anonymous> (C:\Users\Abishek\AppData\Roaming\npm\node_modules\mocha\bin\_mocha:283:6)
Employees.find({where:{role:'MANAGER'}}).max('age').on('success',function(){
});