Skip to content

Instantly share code, notes, and snippets.

Abhi Yerra abhiyerra

Block or report user

Report or block abhiyerra

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View OpenbravoPosCsvImport.rb
require 'rubygems'
require 'mysql'
require 'csv'
require 'uuid'
Uuid = UUID.new
DBh = nil
DBh = Mysql.real_connect("localhost", "root", "", "openbravopos")
View Ticket.Buttons
<!-- This should go in your Ticket.Buttons resource file. -->
<event key="ticket.close" code="event.close"/>
View Update.Pole
// <event key="ticket.close" code="Update.Pole"/>
String displayOut = "Welcome to Om Spices!";
index = sales.getSelectedIndex();
if (index >= 0) {
line = ticket.getLine(index);
if (value != null) {
displayOut = line.printName() + "\n" +
line.printPrice() + " x " + line.printMultiply() + " = " + line.printSubValue() +"\u0003";
View Dial.js
function speak(text) {
session.speak("flite", "kal", text);
}
function getNumber() {
speak("Enter the number then press pound");
number = '';
while((digit = session.getDigits(1, '', 20000)) != '#') {
View build_for_iphone.sh
#!/bin/bash
# Thanks to http://latenitesoft.blogspot.com/2008/10/iphone-programming-tips-building-unix.html
export DEVROOT=/Developer/Platforms/iPhoneOS.platform/Developer
export SDKROOT=$DEVROOT/SDKs/iPhoneOS2.2.sdk
export LIBNAME="osip"
U_CC=$CC
View Humanitex.tex
\documentclass[12pt]{article}
\usepackage[hmargin=1.0in,vmargin=1.0in]{geometry}
\usepackage{setspace}
\usepackage{alltt}
\begin{document}
\begin{flushright}
Kesava Yerra\\
Janurary 1, 2009\\
Humanities 101
View latex-compile.sh
latex paper
bibtex paper
latex paper
pdflatex paper
cat paper.tex | sed 's/^.*bibliography/%/g' | sed 's/^.*setspace/%/g' | sed 's/^.*biblatex/%/g' | sed 's/^.*singlespacing/%/g' | sed 's/^.*doublespacing/%/g' > paper2.tex
latex paper2.tex
latex2rtf -o paper.rtf paper2.tex
rm paper2.*
View posterous_post.rb
require "rubygems"
require "jdbc/mysql"
require "java"
require 'RedCloth'
require 'net/http'
require 'uri'
def post_entries
begin
# Prep the connection
View xml_pp.rb
require 'rexml/document'
REXML::Document.new(open(ARGV[0]).read).write($stdout, 4)
@abhiyerra
abhiyerra / xml_pp.rb
Created May 29, 2009
Pretty print an xml document
View xml_pp.rb
#!/usr/bin/env ruby
require 'rexml/document'
REXML::Document.new(open(ARGV[0]).read).write($stdout, 4)
You can’t perform that action at this time.