Skip to content

Instantly share code, notes, and snippets.

View madhur's full-sized avatar
🎯
Focusing

Madhur Ahuja madhur

🎯
Focusing
View GitHub Profile
public static string NumberToWords(int number)
{
if (number == 0)
return "zero";
if (number < 0)
return "minus " + NumberToWords(Math.Abs(number));
string words = "";
// Node.js CheatSheet.
// Download the Node.js source code or a pre-built installer for your platform, and start developing today.
// Download: http://nodejs.org/download/
// More: http://nodejs.org/api/all.html
// 0. Synopsis.
// http://nodejs.org/api/synopsis.html
@madhur
madhur / cull.js
Last active August 29, 2015 14:05
cull
var http = require('http');
var qs = require('querystring');
var parse = require('url');
http.createServer(function(request, response)
{
var url = parse.parse(request.url);
var params = qs.parse(url.query);
var word = params["str"];
@madhur
madhur / guake-multimon.py
Last active August 29, 2015 14:07
Guake multimonitor patch - Assumes 2 monitors left and right with equal resolution of 1920 x 1080.
#! /usr/bin/python
# -*- coding: utf-8; -*-
"""
Copyright (C) 2007-2012 Lincoln de Sousa <lincoln@minaslivre.org>
Copyright (C) 2007 Gabriel Falcão <gabrielteratos@gmail.com>
This program is free software; 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 2 of the
License, or (at your option) any later version.
@Entity
@Table(name="user3_android")
public class UserAndroid extends Domain<Integer> implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy=GenerationType.IDENTITY)
private Integer id;
/**
* The persistent class for the user database table.
*
*/
@Entity
@Table(name="user3")
public class User extends Domain<Integer> implements Serializable {
private static final long serialVersionUID = 1L;
24 Mar 2015 20:15:14 > org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter - Opening JPA EntityManager in OpenEntityManagerInViewFilter
24 Mar 2015 20:15:14 > org.springframework.transaction.support.TransactionSynchronizationManager - Bound value [org.springframework.orm.jpa.EntityManagerHolder@6427300a] for key [org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean@47672d99] to thread [http-bio-8080-exec-3]
24 Mar 2015 20:15:14 > org.springframework.web.servlet.DispatcherServlet - Bound request context to thread: org.apache.struts2.dispatcher.StrutsRequestWrapper@5927198c
24 Mar 2015 20:15:14 > org.springframework.web.servlet.DispatcherServlet - DispatcherServlet with name 'mvc' processing PUT request for [/mobileapp/v1/put/user/profile.json]
24 Mar 2015 20:15:14 > org.springframework.web.servlet.DispatcherServlet - Testing handler map [org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping@3bf55f38] in DispatcherServlet with name 'mvc'
24 Mar 2015
24 Mar 2015 20:20:31 > org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter - Opening JPA EntityManager in OpenEntityManagerInViewFilter
24 Mar 2015 20:20:31 > org.springframework.transaction.support.TransactionSynchronizationManager - Bound value [org.springframework.orm.jpa.EntityManagerHolder@962fecd] for key [org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean@23baf298] to thread [http-bio-8080-exec-3]
24 Mar 2015 20:20:31 > org.springframework.web.servlet.DispatcherServlet - Bound request context to thread: org.apache.struts2.dispatcher.StrutsRequestWrapper@52a3b799
24 Mar 2015 20:20:31 > org.springframework.web.servlet.DispatcherServlet - DispatcherServlet with name 'mvc' processing PUT request for [/mobileapp/v1/put/user/profile.json]
24 Mar 2015 20:20:31 > org.springframework.web.servlet.DispatcherServlet - Testing handler map [org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping@49f7de8] in DispatcherServlet with name 'mvc'
24 Mar 2015 20
apply plugin: 'java'
apply plugin: 'application'
sourceCompatibility = 1.7
targetCompatibility = 1.7
version = 1.0
// tag::repositories[]
repositories {
mavenLocal()
total 257576
-rw-r--r-- 1 madhur staff 63879 Dec 7 22:24 EmailParser.jar
-rw-r--r-- 1 madhur staff 374675 Feb 2 12:04 Filters.jar
-rw-r--r-- 1 madhur staff 94791 Dec 26 13:22 Pubnub-StandardEdition-3.7.0.jar
-rw-r--r-- 1 madhur staff 6083 Dec 7 22:24 YUIAnt.jar
-rw-r--r-- 1 madhur staff 54850 Dec 7 22:24 activation.jar
-rw-r--r-- 1 madhur staff 4486 Dec 7 22:24 akismet-java-1.02.jar
-rw-r--r-- 1 madhur staff 443432 Dec 7 22:24 antlr-2.7.6.jar
-rw-r--r-- 1 madhur staff 167735 Dec 7 22:24 antlr-runtime-3.5.jar
-rw-r--r-- 1 madhur staff 4467 Dec 7 22:24 aopalliance-1.0.jar