Skip to content

Instantly share code, notes, and snippets.

View skihero's full-sized avatar

Kish skihero

  • Amazon Mechanical Turk
  • Ooty
View GitHub Profile
@skihero
skihero / create sipx user wsdl
Created March 2, 2011 09:43
create sipx user wsdl
PBXService
----------------------------------------------------------------------------------------------------
Generate the Webservices stubs from the wsdl file given in the sipx site.
CreateUser should be written like this
/* Read the credentials from somewhere */
/* From global.xml file that our ConfReader will handle */
String credentials = "superadmin:12345";
export AXIS_HOME=/usr/share/java/axis
export AXIS_LIB=/usr/share/java
export AXISCLASSPATH=$AXIS_LIB/axis/axis.jar:/usr/share/java/commons-discovery.jar:/usr/share/java/commons-logging.jar:/usr/share/java/jaxrpc.jar:/usr/share/java/saaj.jar:/usr/share/java/log4j-1.2.8.jar:/usr/share/java/xml-apis.jar:/usr/share/java/xercesImpl.jar:/usr/share/java/xerces-j2.jar:/usr/share/java/axis/dom3-xerces-j2.jar:/usr/share/java/axis/jaxrpc.jar:/usr/share/java/wsdl4j.jar
@skihero
skihero / alternaives_howto
Created March 2, 2011 09:52
use alternatives to set java path
alternatives --install /usr/bin/java java /usr/java/jdk1.5.0_18/bin/java 1
@skihero
skihero / Using gwt webAppCreator
Created March 2, 2011 09:59
Using gwt webAppCreator
./webAppCreator -out AdminPortal com.portal.gwt.adminportal
This creates the webapp
cd gwt-2.1.1
cd AdminPortal/
ant build This builds a deploy
v# cutting an mp3 file to right length:
ffmpeg -i music.mp3 -ss 00:00:00 -t 00:01:00 -vcodec copy -acodec mp3 music-cut.mp3
# generating video from snapshots and mp3
ffmpeg -f image2 -r 24 -i ./%05d.png -i music-cut.mp3 -acodec copy -sameq ./video.avi -pass 2
@skihero
skihero / svn_log_processing
Created March 7, 2011 09:32
lame attempt to write a svn log visualizer using processing
class Person {
int commits ;
String name ;
Person() {
this(0, "noname") ;
}
@skihero
skihero / mysql_commands
Created March 7, 2011 11:55
create mysql user
Setting the priveleges for remote users in mysql
create user 'remote'@'10.af.a.56 identified by '12345' ;
grant all on test.* to 'remote'@'10.af.xa.56' identified by '12345 ' ;
@skihero
skihero / mysql_stored
Created March 17, 2011 11:47
create stored procedure in mysql
# set the delimiter to // to avoid confusion with the ; in the procedure body
delimiter //
CREATE PROCEDURE people()
BEGIN
SELECT user, host, password from mysql.user ;
END //
# To see the procedures
To reuse the zimbra mysql db
I do
basedir = /opt/zimbra/mysql
datadir = /opt/zimbra/db/data
socket = /opt/zimbra/db/mysql.sock
pid-file = /opt/zimbra/db/mysql.pid
#bind-address = localhost
port = 7306
user = zimbra
tmpdir = /opt/zimbra/data/tmp
@skihero
skihero / ExtractZimbraJsonResponse.java
Created March 24, 2011 12:35
ExtractZimbraJsonResponse
package com.org.json;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import org.apache.commons.io.*;
import org.json.*;