Skip to content

Instantly share code, notes, and snippets.

@theanuradha
theanuradha / git-clearHistory
Created May 21, 2020 09:25 — forked from stephenhardy/git-clearHistory
Steps to clear out the history of a git/github repository
-- Remove the history from
rm -rf .git
-- recreate the repos from the current content only
git init
git add .
git commit -m "Initial commit"
-- push to the github remote repos ensuring you overwrite history
git remote add origin git@github.com:<YOUR ACCOUNT>/<YOUR REPOS>.git
@theanuradha
theanuradha / FilteredTreeColumnLayout
Last active September 20, 2016 09:08
FilteredTreeColumnLayout
package org.mwc.cmap.NarrativeViewer;
import org.eclipse.jface.layout.AbstractColumnLayout;
import org.eclipse.jface.util.Util;
import org.eclipse.jface.viewers.ColumnLayoutData;
import org.eclipse.jface.viewers.ColumnPixelData;
import org.eclipse.swt.events.TreeEvent;
import org.eclipse.swt.events.TreeListener;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Scrollable;
import java.util.concurrent.*;
import javafx.application.Application;
import static javafx.application.Application.launch;
import javafx.application.Platform;
import javafx.beans.property.*;
import javafx.concurrent.Task;
import javafx.event.*;
import javafx.geometry.Pos;
import javafx.scene.*;
import javafx.scene.control.*;
@theanuradha
theanuradha / gist:5df0ce89b4b77f8ef022
Created November 13, 2014 09:39
LOCALE FORMATES
FORMAT
Malay (Malaysia): #,##0.### -> -1,234.56 -> -1234.56
Arabic (Qatar): #,##0.###;#,##0.###- -> 1,234.56- -> -1234.56
Icelandic (Iceland): #,##0.### -> -1.234,56 -> -1234.56
Finnish (Finland): #,##0.### -> -1 234,56 -> -1234.56
English (Malta): #,##0.### -> -1,234.56 -> -1234.56
Italian (Switzerland): #,##0.### -> -1'234.56 -> -1234.56
Dutch (Belgium): #,##0.### -> -1.234,56 -> -1234.56
Arabic (Saudi Arabia): #,##0.###;#,##0.###- -> 1,234.56- -> -1234.56
Arabic (Iraq): #,##0.###;#,##0.###- -> 1,234.56- -> -1234.56
# First verify the version of Java being used is not SunJSK.
java -version
# Get the latest Sun Java SDK from Oracle http://www.oracle.com/technetwork/java/javase/downloads/jdk-7u1-download-513651.html
wget http://download.oracle.com/otn-pub/java/jdk/7u1-b08/jdk-7u1-linux-i586.rpm
# Rename the file downloaded, just to be nice
mv jdk-7u1-linux-i586.rpm\?e\=1320265424\&h\=916f87354faed15fe652d9f76d64c844 jdk-7u1-linux-i586.rpm
# Install Java
/*******************************************************************************
******************************************************************************/
package de.eiswind.mango.widgets.select2;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.List;
var SELECT2_BASEPATH = "rwt-resources/select2/";
(function() {
'use strict';
rap.registerTypeHandler("eiswind.Select2", {
factory : function(properties) {
return new eiswind.Select2(properties);
},
@theanuradha
theanuradha / gist:970249
Created May 13, 2011 09:26
Eclipse Image/Overlay Helper
public class AEclipsePluginImages{
private final static ImageRegistry PLUGIN_REGISTRY = new ImageRegistry();
public final static String ICONS_PATH = "icons/"; //$NON-NLS-1$
private static final String PATH_OBJ = ICONS_PATH + "obj16/"; //$NON-NLS-1$
private static final String PATH_LCL = ICONS_PATH + "elcl16/"; //$NON-NLS-1$
private static final String PATH_LCL_DISABLED = ICONS_PATH + "dlcl16/"; //$NON-NLS-1$
public static final ImageDescriptor DESC_MODEL_OVERVIEW = create(PATH_OBJ,