This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* 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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
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" | |
} | |
.... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
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" | |
} | |
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* This content is released under the MIT License (http://opensource.org/licenses/MIT). | |
* Copyright (c) 2014 Luca Cesari <[email protected]> | |
*/ | |
package lucacesari.gists; | |
import java.util.Collections; | |
import java.util.HashMap; | |
import java.util.Map; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* This content is released under the MIT License (http://opensource.org/licenses/MIT). | |
* Copyright (c) 2014 Luca Cesari <[email protected]> | |
*/ | |
package lucacesari.gists; | |
import java.util.ArrayList; | |
import java.util.List; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ext { | |
mainClassName = "foo.bar.buz.mainClass" | |
basename = "fooBar" | |
version = "42.0" | |
} | |
task obfuscate(type: proguard.gradle.ProGuardTask) { | |
injars "./build/libs/${basename}-${version}.jar" | |
outjars "./build/libs/${basename}-${version}-obf.jar" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ext { | |
vendor = "vendor" | |
version = "42.0" | |
basename = "foo" | |
mainClassName = "bar.foo.mainClass" | |
} | |
dependencies { | |
compile project(':my_other_project') | |
compile 'ch.qos.logback:logback-classic:1.1.1' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
REM Usage: test_path.bat cmd_to_test | |
for %%x in (%1) do ( | |
if not [%%~$PATH:x]==[] ( | |
echo "Command %1 found" | |
goto :eof | |
) | |
) | |
echo "Command %1 NOT found" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
REM Usage: add_env_var.bat NEW_ENV_VAR "my_path" | |
REM If the inserted path contains spaces remember to quote it | |
REG ADD "HKLM\SYSTEM\ControlSet001\Control\Session Manager\Environment" /v %1 /t REG_SZ /d %2 | |
NewerOlder