Skip to content

Instantly share code, notes, and snippets.

View jarek-przygodzki's full-sized avatar

Jarek Przygódzki jarek-przygodzki

View GitHub Profile
@jarek-przygodzki
jarek-przygodzki / eclipse-error.txt
Created February 28, 2014 11:35
[eclipse] An internal error occurred during: "Computing type hierarchy of 'Queue<E> - java.util'...". https://bugs.eclipse.org/bugs/show_bug.cgi?id=418273
eclipse.buildId=4.3.0.M20130911-1000
java.version=1.7.0_51
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=pl_PL
Framework arguments: -product org.eclipse.epp.package.jee.product -showlocation
Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product -showlocation
Error
Fri Feb 28 12:33:30 CET 2014
Windows Firewall
Turn off
NetSh Advfirewall set allprofiles state off
Turn on
NetSh Advfirewall set allrprofiles state on
Check the status of Windows Firewall
Netsh Advfirewall show allprofiles
set JAVA_OPTS=-Dgroovy.source.encoding=UTF-8 -Dfile.encoding=Cp852 -Xmx1G
@jarek-przygodzki
jarek-przygodzki / gist:cb0ab50d08d59cccc335
Created July 3, 2014 18:53
Java JUnit test static imports
import static org.junit.Assert.*;
import static org.junit.matchers.JUnitMatchers.*;
import static org.hamcrest.CoreMatchers.*;
using System.Net.NetworkInformation;
var args = Env.ScriptArgs;
if(args.Count > 0) {
var ping = new Ping();
var reply = ping.Send(args[0]);
Console.WriteLine("Pinging {0} [{1}]: {2}", args[0], reply.Address, reply.Status);
}
@jarek-przygodzki
jarek-przygodzki / gist:75bc248dabc546f738bd
Created July 5, 2014 10:44
chocolatey - list all the installed packages
cver all -localonly
@jarek-przygodzki
jarek-przygodzki / gist:1f35cd4aa55d2d00f382
Last active August 29, 2015 14:04
Window » Preferences » Java » Editor » Content Assist » Favorites
org.hamcrest.Matchers.*
org.hamcrest.CoreMatchers.*
org.junit.*
org.junit.Assert.*
org.junit.Assume.*
org.junit.matchers.JUnitMatchers.*
org.mockito.Mockito.*
private static String toUnicode(char ch) {
return String.format("\\u%04x", (int) ch);
}
@jarek-przygodzki
jarek-przygodzki / gist:916a2669e0b2dcd6f49a
Created August 6, 2014 14:04
Parse java.util.Date#toString output
def fmt = new java.text.SimpleDateFormat('EEE MMM dd HH:mm:ss zzz yyyy', Locale.US)
fmt.parse('Tue Jul 01 06:00:00 GMT+01:00 2014')
@jarek-przygodzki
jarek-przygodzki / RunVS2013Test.cmd
Created August 19, 2014 17:28
Visual Studio 2013 - Running automated tests from the command line
VSTest.Console.exe [TestFileNames] [Options]