Skip to content

Instantly share code, notes, and snippets.

@varver
varver / validation_plugin.js
Last active August 29, 2015 14:03
javascript plugin for form validation . Easily add custom validations in less than a minute .
// plugin to be used for validating widgets for forms or anything with defined rules
/*
////////////////////////////////////////////////////////////////////////////////////////
How to use ?
1) Add class = "validator" to element which has to be validated.
2) Add comma separated validation constraints in attribute called validator in that element like : validator="required,url"
(validators are defined in function called "Check_Validation" you can add more validators here .)
Example = <input name="url" value="http://google.com" class="validator" , validator="required,url">
@varver
varver / Nosql DB Test.txt
Created June 9, 2014 07:44
No Sql Data Write Test Results
We tried 1 million records and results were like .
riak took 20 minutes
mongodb took 2 minutes
GDBM took 20 seconds
Level DB took 12 seconds .
@varver
varver / mogo_write.go
Last active August 29, 2015 14:02
Insert and retrieve data from mongodb with golang.
/*
Insert and retrieve data from mongodb with golang .
*/
package main
import (
"fmt"
"labix.org/v2/mgo"
// "labix.org/v2/mgo/bson"