Skip to content

Instantly share code, notes, and snippets.

@vishwassharma
vishwassharma / GuardFile
Created May 21, 2012 07:43
GuardFile for development system
# A sample Guardfile
# More info at https://github.com/guard/guard#readme
guard 'coffeescript', :output => 'public/js' do
watch(%r{public/coffee/(.*)\.coffee})
end
guard 'coffeescript', :output => 'tests/spec/js' do
watch(%r{tests/spec/coffee/(.*)\.coffee})
end
@vishwassharma
vishwassharma / nesting.js
Created May 29, 2012 03:10 — forked from geddski/nesting.js
helper function for nesting backbone collections.
function nestCollection(model, attributeName, nestedCollection) {
//setup nested references
for (var i = 0; i < nestedCollection.length; i++) {
model.attributes[attributeName][i] = nestedCollection.at(i).attributes;
}
//create empty arrays if none
nestedCollection.bind('add', function (initiative) {
if (!model.get(attributeName)) {
model.attributes[attributeName] = [];
@vishwassharma
vishwassharma / Walkthrough
Created June 23, 2012 01:09
Lorem Ipsum For MongoDB
Install Java
Install databene
http://databene.org/
To install databene create a folder to known location
and add the path to bashrc file
+ export BENERATOR_HOME='/path/to/databene/folder'
+ export PATH=$PATH:$BENERATOR_HOME/bin
@vishwassharma
vishwassharma / Form
Created July 10, 2012 07:56
Backbone Projects
Rich Text editor
git://github.com/joshontheweb/etch.git
@vishwassharma
vishwassharma / Package.json
Created February 25, 2013 21:25
The basic JSON file
{
"name": "bisnux",
"version": "0.0.1",
"author": "Vishwas Sharma <[email protected]>",
"description": "A simple ecommerce solution",
"contributors": [
{
"name": "Vishwas Sharma",
"email": "[email protected]"
}
@vishwassharma
vishwassharma / .gitconfig
Created March 2, 2013 07:40
A git configuration for my system
[user]
name = Vishwas Sharma
email = [email protected]
[color]
ui = auto
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
1. Create new SSH key
ssh-keygen -t rsa -C "[email protected]"
<set the appropriate path for the keys>
Use a path like /home/cr01nk/.ssh/identity.heroku.work
2. Once the keys are generated the add the heroku multiple account plugin
heroku plugins:install git://github.com/ddollar/heroku-accounts.git
3. Add the following in you ~/.ssh/config
@vishwassharma
vishwassharma / llvm
Created March 3, 2013 12:16
LLVM/Clang now builds for Cortex-M3?
cd llvm
git clone http://llvm.org/git/llvm.git
cd llvm/tools
git clone http://llvm.org/git/clang.git
cd llvm/projects
git clone http://llvm.org/git/compiler-rt.git
cd ../llvm-build/
@vishwassharma
vishwassharma / .gitignore
Last active January 28, 2016 04:02
Creating a .gitignore file which can be used in Keil uVision projects
*.axf
*.htm
*.Inp
*.map
*.tra
*.dep
*.__i
*.crf
*.d
*.o
@vishwassharma
vishwassharma / get_yocto.sh
Last active December 19, 2015 09:48
Getting started with Yocto ...
#I like to work in home bin directory
cd $HOME/bin
#Get the source code
wget http://downloads.yoctoproject.org/releases/yocto/yocto-1.4/poky-dylan-9.0.0.tar.bz2
#Extract the files into the corresponding directory
tar xvf poky-dylan-9.0.0.tar.bz2
cd poky-dylan-9.0.0