Skip to content

Instantly share code, notes, and snippets.

View creativeaura's full-sized avatar
🌴
On vacation

Gaurav Jassal creativeaura

🌴
On vacation
View GitHub Profile
@creativeaura
creativeaura / linkify.js
Created November 6, 2012 14:01 — forked from briancray/linkify.js
Linkify Twitter API entities
/*
Compliant with Twitter's Developer Display Requirements:
https://dev.twitter.com/terms/display-requirements
*/
var linkify_result = function (tweet /* tweet object from the results array */) {
var subs = [],
last_offset = 0,
new_tweet = '',
entity,
replace = {
@creativeaura
creativeaura / quiz.js
Created October 9, 2012 10:11
Javascript Quiz
var x = '' + 0/0, y = typeof true; (y[0] + x[1] + x + x[1]).toLowerCase()
@creativeaura
creativeaura / html.html
Created September 18, 2012 08:27
HTML Data
data:text/html,<input name="name">
@creativeaura
creativeaura / server.bat
Created July 12, 2012 14:33
Run Python server from any folder on windows
@ECHO OFF
CLS
IF [%1]==[] (
C:\Python27\python.exe -m SimpleHTTPServer
) else (
C:\Python27\python.exe -m SimpleHTTPServer %1
)
@creativeaura
creativeaura / jq_plugin.js
Created April 30, 2012 08:01
jQuery Plugin Template
// jQuery Plugin Boilerplate
// A boilerplate for jumpstarting jQuery plugins development
;(function($) {
$.pluginName = function(el, options) {
var defaults = {
propertyName: 'value',
onSomeEvent: function() {}
@creativeaura
creativeaura / webkit-border-gradients.css
Created April 12, 2012 09:20
webkit-border gradient
div {
width:200px;
height:225px;
background:#DFDFDF;
border-style:solid;
border-width:10px;
-webkit-border-image: -webkit-linear-gradient(top, rgba(255,255,255,1) 10%,rgba(41,184,229,1) 100%) 1 100% 1 1 stretch stretch;
}
@creativeaura
creativeaura / define_rjs.js
Created March 7, 2012 12:07
Define RequireJs Module
// Use this as a quick template for future modules
define([
'jquery',
'underscore',
'backbone'
], function($, _, Backbone){
return {};
});
@creativeaura
creativeaura / save.json
Created July 27, 2015 22:03
saving data
{
"cart": [
{
"id": "1",
"name": "Bead 1",
"selectedSize": "M",
"qty": "3",
"price": "4"
},
{
@creativeaura
creativeaura / manifest.json
Created July 27, 2015 21:54
easeljs loading file
{
"path": "",
"manifest": [
{
"src": "images/beads/v92_qij9084e.png",
"id": "bead1",
"title": "Bead 1",
"size": [{"R": 4}],
"asset_type": "bead"
},
{
id: 5662,
name: "Self Black Top",
code: "M1415331",
price: 1645,
images: [
"http://www.madameonline.com/multimedias/images/products/medium/ProductColor-1424261470.jpg",
"http://www.madameonline.com/multimedias/images/products/medium/Product-209270516.jpg",
"http://www.madameonline.com/multimedias/images/products/medium/Product-2039069370.jpg",
"http://www.madameonline.com/multimedias/images/products/medium/Product-972434320.jpg"