Skip to content

Instantly share code, notes, and snippets.

@omidp
omidp / gist:7470142
Created November 14, 2013 16:48
openbravo ticket preview
<?xml version="1.0" encoding="UTF-8"?>
<!--
Openbravo POS is a point of sales application designed for touch screens.
Copyright (C) 2007-2009 Openbravo, S.L.
http://sourceforge.net/projects/openbravopos
This file is part of Openbravo POS.
Openbravo POS is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@omidp
omidp / gist:7637841
Created November 25, 2013 07:52
box grinder
name: f15-basic
summary: Just Enough Operating System based on Fedora 15
os:
name: fedora
version: 15
hardware:
partitions:
"/":
size: 2
packages:
@omidp
omidp / gist:8004418
Created December 17, 2013 12:48
html 5
<!doctype html>
<html>
<head>
<title>Great Home Page</title>
<meta charset="utf-8">
</head>
<body>
<div id="header ">
<h1><a href="/">Great Home Page</a></h1>
</div>
@omidp
omidp / gist:8168270
Created December 29, 2013 07:21
spring Bootstrap
public class Bootstrap {
    private static final Logger logger= LoggerFactory.getLogger(Bootstrap.class);
    public static void main(String[] args) {
        ApplicationContext context=new ClassPathXmlApplicationContext("META-INF/spring/...-context.xml");
        CustomerService customerService=(CustomerService) context.getBean("customerService");
...
import android.content.Context;
import android.graphics.Typeface;
import android.os.Build;
import android.widget.Toast;
public final class Farsi {
public static boolean isFarsiConversionNeeded = true;
private final static String szLamAndAlef = Character
public class PersianReshape {
static final char RIGHT_LEFT_CHAR= 0x0001;
static final char RIGHT_NOLEFT_CHAR_ALEF=0x0006;
static final char RIGHT_NOLEFT_CHAR=0x0004;
static final char RIGHT_LEFT_CHAR_LAM=0x0003;
static final char TANWEEN=0x000C;
static final char TASHKEEL=0x000A;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. The ASF licenses this file to You
* under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@omidp
omidp / tomcatCluster
Created June 7, 2014 07:55
best finest tomcat clustering config
<Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"
channelSendOptions="6">
<Manager className="org.apache.catalina.ha.session.BackupManager"
expireSessionsOnShutdown="false"
notifyListenersOnReplication="true"
mapSendOptions="6"/>
<!--
<Manager className="org.apache.catalina.ha.session.DeltaManager"
expireSessionsOnShutdown="false"
@omidp
omidp / clonehttp
Created June 24, 2014 08:09
Clone HTTP gist github
git clone https://USERNAME:[email protected]/name/projectName.git
@omidp
omidp / G1Jvm
Last active August 29, 2015 14:04
G1 Garbage Collector
-Djava.awt.headless=true -Dfile.encoding=UTF-8 -XX:+UseG1GC -XX:MaxGCPauseMillis=350 -XX:InitiatingHeapOccupancyPercent=45 -server -Xms6144m -Xmx6144m -XX:NewSize=4096m -XX:MaxNewSize=6g -XX:PermSize=4g -XX:MaxPermSize=6g -XX:+DisableExplicitGC -XX:ParallelGCThreads=8 -XX:+UseParallelGC