Skip to content

Instantly share code, notes, and snippets.

View lucacesari's full-sized avatar
🎯
Focusing

Luca Cesari lucacesari

🎯
Focusing
  • RCP Vision
  • Florence (Italy)
View GitHub Profile
@lucacesari
lucacesari / emfDependencies.gradle
Created August 3, 2015 07:30
EMF Framework dependencies for non-osgi projects
...
dependencies {
compile "org.eclipse.emf:org.eclipse.emf.ecore:2.9.0-v20130528-0742"
compile "org.eclipse.emf:org.eclipse.emf.common:2.9.0-v20130528-0742"
compile "org.eclipse.emf:org.eclipse.emf.ecore.xmi:2.9.0-v20130528-0742"
}
...
@lucacesari
lucacesari / swtDependencies.gradle
Created August 3, 2015 07:34
SWT Dependecies for non-osgi projects
...
repositories {
maven {url "https://raw.githubusercontent.com/maven-eclipse/swt-repo/master/"}
}
...
dependencies {
...
compile "org.eclipse.swt:org.eclipse.swt.win32.win32.x86:4.4"
}
....
@lucacesari
lucacesari / UsbTetheringUtil.java
Created August 7, 2015 14:53
Open Android USB Tethering Configuration
/*
* This content is released under the MIT License (http://opensource.org/licenses/MIT).
* Copyright (c) 2015 Luca Cesari <[email protected]>
*/
package lucacesari.gists;
import android.app.Activity;
import android.content.Intent;
@lucacesari
lucacesari / WorkingProcessWaitFor.java
Created August 27, 2015 14:26
Java Process hanging waitFor() fix
Process p = Runtime.getRuntime().exec("my-long-command");
BufferedInputStream in = new BufferedInputStream(process.getInputStream());
byte[] bytes = new byte[4096];
while (in.read(bytes) != -1) {}
process.waitFor();