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
  • Greenlyst Inc.
  • Bangalore, India
View GitHub Profile
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
};
var Intimidate = require('intimidate');
var s3Uploader = function(options) {
try {
this.client = new Intimidate(options);
} catch (e) {
return null;
}
};
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,
@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",
{
"USD": {
"symbol": "$",
"name": "US Dollar",
"symbol_native": "$",
"decimal_digits": 2,
"rounding": 0,
"code": "USD",
"name_plural": "US dollars"
},
// =========================================================
// Iron.io MQ
// =========================================================
IronMqRestClient ironMq = IronSharp.IronMQ.Client.New();
//// Get a Queue object
QueueClient queue = ironMq.Queue("my_queue");
QueueInfo info = queue.Info();
@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
@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 / css_resources.md
Last active August 29, 2015 14:12 — forked from jookyboi/css_resources.md
CSS libraries and guides to bring some order to the chaos.

Libraries

  • 960 Grid System - An effort to streamline web development workflow by providing commonly used dimensions, based on a width of 960 pixels. There are two variants: 12 and 16 columns, which can be used separately or in tandem.
  • Compass - Open source CSS Authoring Framework.
  • Bootstrap - Sleek, intuitive, and powerful mobile first front-end framework for faster and easier web development.
  • Font Awesome - The iconic font designed for Bootstrap.
  • Zurb Foundation - Framework for writing responsive web sites.
  • SASS - CSS extension language which allows variables, mixins and rules nesting.
  • Skeleton - Boilerplate for responsive, mobile-friendly development.

Guides

[2015-02-13 22:50:01] staging.ERROR: Error 500 on GET http://dev.viralstyle.com/client/campaigns/datatable/upsell: exception 'ErrorException' with message 'Trying to get property of non-object' in /var/www/viral-tees/htdocs/app/library/Datatables/Client/ColumnHelpers/UpsellColumnHelperTrait.php:16 Stack trace: #0 /var/www/viral-tees/htdocs/app/library/Datatables/Client/ColumnHelpers/UpsellColumnHelperTrait.php(16): Illuminate\Exception\Handler->handleError(8, 'Trying to get p...', '/var/www/viral-...', 16, Array) #1 /var/www/viral-tees/htdocs/app/library/Datatables/Client/Upsells/UpsellDatatable.php(33): ViralTees\Library\Datatables\Client\Upsells\UpsellDatatable->getShirtColumn(Object(Campaign)) #2 /var/www/viral-tees/htdocs/app/library/Datatables/AbstractDatatable.php(235): ViralTees\Library\Datatables\Client\Upsells\UpsellDatatable->ViralTees\Library\Datatables\Client\Upsells{closure}(Object(Campaign)) #3 /var/www/viral-tees/htdocs/app/library/Datatables/AbstractDatatable.php(264): ViralTees\Library\Data