Skip to content

Instantly share code, notes, and snippets.

require 'rubygems'
require 'mysql'
require 'csv'
require 'uuid'
Uuid = UUID.new
DBh = nil
DBh = Mysql.real_connect("localhost", "root", "", "openbravopos")
<!-- This should go in your Ticket.Buttons resource file. -->
<event key="ticket.close" code="event.close"/>
// <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";
function speak(text) {
session.speak("flite", "kal", text);
}
function getNumber() {
speak("Enter the number then press pound");
number = '';
while((digit = session.getDigits(1, '', 20000)) != '#') {
#!/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
\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
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.*
require "rubygems"
require "jdbc/mysql"
require "java"
require 'RedCloth'
require 'net/http'
require 'uri'
def post_entries
begin
# Prep the connection
require 'rexml/document'
REXML::Document.new(open(ARGV[0]).read).write($stdout, 4)
@abhiyerra
abhiyerra / xml_pp.rb
Created May 29, 2009 08:05
Pretty print an xml document
#!/usr/bin/env ruby
require 'rexml/document'
REXML::Document.new(open(ARGV[0]).read).write($stdout, 4)