Skip to content

Instantly share code, notes, and snippets.

View nsisodiya's full-sized avatar

Narendra Sisodiya nsisodiya

View GitHub Profile
@nsisodiya
nsisodiya / Gruntfile.js
Created April 30, 2014 18:10
Hints for using underscore template
module.exports = function(grunt) {
"use strict";
// Project configuration.
var resourceFiles = grunt.file.readJSON('src/resource/resource.json');
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
watch: {
template: {
files: resourceFiles.templateFiles.map(function(v, i) {
return "./src/" + v;
@nsisodiya
nsisodiya / listAllStringFromJsfile.sh
Created May 3, 2014 08:36
This will be helpful in listing all double quoted strings from your js files. It will list strings which has more then 5 spaces
#!/bin/bash
find src -name "*.js" | grep -v src/external | while read i
do
awk -F \" '
{
sep=""
for (i=2; i<=NF; i+=2) {
printf "%s\"%s\"", sep, $i
@nsisodiya
nsisodiya / .bowerrc
Last active August 29, 2015 14:01
My bower setup
{
"directory": "src/external"
}
@nsisodiya
nsisodiya / .jshintrc
Created May 28, 2014 11:38
My Jshint Configuration
{
"curly": true,
"eqnull": true,
"eqeqeq": false,
"undef": true,
"plusplus": false,
"curly": true,
"camelcase": true,
"latedef": "nofunc",
"noempty": true,
@nsisodiya
nsisodiya / jsbeautifier.json
Created May 28, 2014 12:02
JsBeautifier Configuration
{
"html": {
"brace_style": "collapse",
"indent_char": "\t",
"indent_scripts": "keep",
"indent_size": 1,
"indent_with_tabs": true,
"max_preserve_newlines": 10,
"preserve_newlines": true,
"unformatted": ["a", "sub", "sup", "b", "i", "u"],
function md5cycle(x, k) {
var a = x[0], b = x[1], c = x[2], d = x[3];
a = ff(a, b, c, d, k[0], 7, -680876936);
d = ff(d, a, b, c, k[1], 12, -389564586);
c = ff(c, d, a, b, k[2], 17, 606105819);
b = ff(b, c, d, a, k[3], 22, -1044525330);
a = ff(a, b, c, d, k[4], 7, -176418897);
d = ff(d, a, b, c, k[5], 12, 1200080426);
c = ff(c, d, a, b, k[6], 17, -1473231341);
@nsisodiya
nsisodiya / person.js
Created June 5, 2014 10:17
Prototype pattern in JavaScript
var Person = function(name, age){
this.setName(name);
this.setAge(age);
};
Person.prototype = {
getName : function(){
return this._name;
},
setName : function(name){
@nsisodiya
nsisodiya / person.js
Created June 5, 2014 10:21
Prototype pattern in JavaScript using klass.js
var Person = klass({
initialize: function(){
this.setName(name);
this.setAge(age);
},
getName : function(){
return this._name;
},
setName : function(name){
this._name = name;
var alert = function (str) {
var st = document.createTextNode(str);
var p = document.createElement('p');
p.appendChild(st);
document.querySelector('body').appendChild(p);
}
REPORT OF THE SANSKRIT COMMISSION 1956-57
Table of Contents
INTRODUCTION
HISTORICAL RETROSPECT
THE PRESENT SITUATION