Skip to content

Instantly share code, notes, and snippets.

View saurshaz's full-sized avatar

saurshaz saurshaz

View GitHub Profile
@saurshaz
saurshaz / polymerbuilder.html
Last active August 29, 2015 14:05
Polymer elements builder (very raw) :: Lets you design HTML elements that may be of use to you.
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery-2.1.0.min.js"></script>
<meta charset="utf-8">
<title>JS Bin</title>
<script src="http://cdnjs.cloudflare.com/ajax/libs/polymer/0.3.4/platform.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/polymer/0.3.4/polymer.js"></script>
@saurshaz
saurshaz / polymer-elements-usage
Last active August 29, 2015 14:05
Polymer elements usage to see what can be done. Almost anything :-)
<script src="http://www.polymer-project.org/platform.js"></script>
<script src="http://www.polymer-project.org/polymer.js"></script>
<polymer-element name="bt-sortable-list" attributes="drag name list">
<template>
<template repeat="{{list}}" id="repeatTemplate" ref="itemTemplate">
<!-- filled by ref template -->
</template>
</template>
@saurshaz
saurshaz / index.html
Created September 16, 2014 13:05
polymer reusing elements in other elements // source http://jsbin.com/qeniw/4
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="polymer reusing elements in other elements" />
<script src="http://cdnjs.cloudflare.com/ajax/libs/polymer/0.3.3/platform.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/polymer/0.3.3/polymer.js"></script>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
@saurshaz
saurshaz / index.html
Created September 30, 2014 14:01
1 component to include different templates and scripts instead of different components // source http://jsbin.com/finike/11
<!DOCTYPE html>
<html><head> <script src="http://cdnjs.cloudflare.com/ajax/libs/polymer/0.3.4/platform.js"></script> <script src="http://cdnjs.cloudflare.com/ajax/libs/polymer/0.3.4/polymer.js"></script></head>
<meta name="description" content="1 component to include different templates and scripts instead of different components" />
<body>
<script>
var fn1 = function(){
alert("master");
}
fn1();
</script>
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="youtube and iframe api poc" />
<script src="//code.jquery.com/jquery-1.9.1.min.js"></script>
<script src="https://www.youtube.com/iframe_api"></script>
<meta charset="utf-8">
<title>JS Bin</title>
@saurshaz
saurshaz / index.html
Created December 11, 2014 11:12
adding attributes to polymer model at runtime // source http://jsbin.com/pifihe
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="adding attributes to polymer model at runtime" />
<script data-require="polymer@*" data-semver="0.5.1" src="http://cdnjs.cloudflare.com/ajax/libs/polymer/0.5.1/polymer.js"></script>
<link rel="stylesheet" href="style.css" />
<script src="script.js"></script>
</head>
@saurshaz
saurshaz / index.html
Last active August 29, 2015 14:11
Element based on the awesome Sortable.js library// source http://jsbin.com/mejuba
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="Element based on the awesome Sortable.js library" />
<link data-require="bootstrap-css@3.3.1" data-semver="3.3.1" rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css" />
<script data-require="polymer@0.5.1" data-semver="0.5.1" src="//cdnjs.cloudflare.com/ajax/libs/polymer/0.5.1/polymer.js"></script>
<link rel="stylesheet" href="style.css" />
<script src="script.js"></script>
</head>
@saurshaz
saurshaz / polymer-map
Created March 23, 2015 06:16
A map search screen in polymer
<template wid="true">
<data class="wid" name="screen2" datatype="html" data-group="grp1">
<style>[drawer] {
background-color: #B99588;
border-right: 1px solid #ccc;
}
[main] {
background-color: #4F7DC9;
}
@saurshaz
saurshaz / CLV computation
Created April 3, 2015 08:11
CLV computation
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="style.css">
<script src="//code.jquery.com/jquery-1.9.1.min.js"></script>
<!--<script src="script.js"></script>-->
<script>
var calculateClv = function(a, b, c, d, e, f) {
<!DOCTYPE html>
<html>
<head>
<script data-require="jquery@2.1.3" data-semver="2.1.3" src="http://code.jquery.com/jquery-2.1.3.min.js"></script>
<link rel="stylesheet" href="style.css" />
<link data-require="bootstrap@3.3.2" data-semver="3.3.2" rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css" />
<script data-require="bootstrap@3.3.2" data-semver="3.3.2" src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js"></script>