Skip to content

Instantly share code, notes, and snippets.

View pranildasika's full-sized avatar

Pranil Dasika pranildasika

  • Bangalore, India
View GitHub Profile
@pranildasika
pranildasika / bookmarklet
Created September 8, 2014 06:48
Bookmarklet
var SITE_CSS = "/css/marklet.css";
var SITE_URL = "http://site.com";
var SITE_REDIRECT_PATH = "/mark/?img=";
if (typeof jQuery == 'undefined') {
var jQ = document.createElement('script');
jQ.type = 'text/javascript';
jQ.onload = runthis;
jQ.src = 'http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js';
document.body.appendChild(jQ);
@pranildasika
pranildasika / gist:2964211
Created June 21, 2012 06:26
Virtual fields using getter and setter methods in sequelize
var Sequelize = require('sequelize')
var sequelize = new Sequelize('sequelize_test', 'root')
//Note that the model definition does not have "fullName"
var User = sequelize.define('User', {
email: Sequelize.STRING,
firstName: Sequelize.STRING,
lastName: Sequelize.STRING,
},
{