Skip to content

Instantly share code, notes, and snippets.

View swaroopsm's full-sized avatar
🚀
Let's Ship it!

Swaroop Sethumadhavan swaroopsm

🚀
Let's Ship it!
View GitHub Profile
@swaroopsm
swaroopsm / vtu.py
Created July 4, 2012 14:33
Fetch results for a particular University Seat Number of VTU
# Copyright (c) 2012 Swaroop SM <[email protected]>
# This program is free: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
@swaroopsm
swaroopsm / maventic.c
Created September 18, 2012 14:49
Program asked by Maventic Company
// Copyright (c) 2012 Swaroop SM <[email protected]>
// This program is free: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
@swaroopsm
swaroopsm / mongoexport
Created March 20, 2013 09:52
Export mongodb collections data and save as json
# Copyright (c) 2013 Swaroop SM <[email protected]>
# This program is free: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# Copyright (c) 2013 Swaroop SM <[email protected]>
# This program is free: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
@swaroopsm
swaroopsm / example.php
Created June 21, 2014 14:24
Simple implementation of PHP templating
<?php
require 'templateengine.php';
$name = 'Swaroop';
$age = 24;
$template = new TemplateEngine();
$template->setTemplate('template.php');
$template->setData('name', $name);
@swaroopsm
swaroopsm / 0_reuse_code.js
Last active August 29, 2015 14:06
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@swaroopsm
swaroopsm / model.js
Created October 19, 2015 05:44
Backbone has-many
var BaseModel = Backbone.Model.extend({
_relations: {
hasOne: {}
},
parse: function(data) {
var model;
if(_.isFunction(this.hasOne)) { this._createRelation('hasOne'); }

Keybase proof

I hereby claim:

  • I am swaroopsm on github.
  • I am swaroopsm (https://keybase.io/swaroopsm) on keybase.
  • I have a public key ASDZtVyzmDbRXdQUDF9GuWuFpEtgnzudryukFKh64Kk28wo

To claim this, I am signing this object: