Skip to content

Instantly share code, notes, and snippets.

View tecoholic's full-sized avatar

Arunmozhi tecoholic

View GitHub Profile
@tecoholic
tecoholic / test.js
Last active August 29, 2015 14:13
A Sample Snippet showing Unit Testing of JS Libraries using CasperJS
/*
Method 1: By loading the library through a web page.
The usability is pretty limited due to what can be returned through evaluate() is limited.
*/
casper.test.begin("Setting up test", 3, function suite(test){
casper.start("http://localhost/livetransit/test/", function(){
// Asserting pages would help
test.assertTitle("Test page", "page exists as expected");
});
@tecoholic
tecoholic / missing.txt
Created June 14, 2013 14:09
Missing modules from REQUIREMENTS.txt from qgis-django
# discovered during setting.py error
pyasn1
# discovered during syncdb error
django-ratings
django-taggit-autosuggest
@tecoholic
tecoholic / intorfloat.cpp
Created March 14, 2013 11:38
A Sample program that illustrated a bug in the compiler, that I am using.
#include <iostream>
using namespace std;
int main()
{
int res;
float fres;
float big = 1600;
@tecoholic
tecoholic / .bashrc
Last active November 26, 2024 20:07
My .bashrc file with a little tweak to show 'git' repo status
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
@tecoholic
tecoholic / symbol_nesting.py
Created December 20, 2012 09:34
The script converts the old QGIS symbol XML structure using the @ notation for sub-symbols into a nested XML DOM structure for proper import in newer versions of QGIS (i.e >=1.9)
"""
/***************************************************************************
symbol_nesting.py
-------------------
begin : 20-12-2012
copyright : (C) 2012 by Arunmozhi
email : aruntheguy at gmail dot com
***************************************************************************/
/***************************************************************************
@tecoholic
tecoholic / robot.js
Created December 3, 2012 20:22
BOMBOMBOM
//FightCode can only understand your robot
//if its class is called Robot
var Robot = function(robot) {
};
Robot.prototype.onIdle = function(ev) {
var robot = ev.robot;
robot.ahead(200);
@tecoholic
tecoholic / symbol_xml2db.py
Created May 28, 2012 10:01
[GSoC] Python Script which converts the symbols XML file to a SQLite DB
#!/usr/bin/python
"""
/***************************************************************************
symbol_xml2db.py
-------------------
begin : 26-5-2012
copyright : (C) 2012 by Arunmozhi
email : aruntheguy at gmail dot com
***************************************************************************/
@tecoholic
tecoholic / ladsat.txt
Created February 14, 2012 09:51
Lansat Meta data
Data Set Attribute Attribute Value
Landsat Scene Identifier LE71420512011268PFS00
Station Identifier PFS
Day Night DAY
WRS Path 142
WRS Row 051
Data Category NOMINAL
Sensor Mode BUMPER
Data Type Level 1 ETM+ L1T
@tecoholic
tecoholic / desc.py
Created January 22, 2012 15:29
Second scrapper for wp-featured-pics
# --*-- coding:utf-8 --*--
''' Ths function collects the picture page url and the description for the
picture. The urls are taken from the pic_page_urls.list
'''
import os
import urrlib2
from BeautifulSoup import BeautifulSoup as bs