This is probably the last post in this blog. I've decided to put any new posts on a markdown-based static site, at blog.zmeeaga.in.
Sunday, December 15, 2019
Sunday, October 27, 2019
old proxy tunneling issue with java
a
Exception in thread "main" java.io.IOException: Unable to tunnel through proxy. Proxy returns "HTTP/1.1 407 Proxy Authentication Required"exception. But surely you have configured everything correctly, including the proxy authentication. You never had this before, but then again you were never before behind an authenticated proxy. You run curl against the same gradle.org address to get the distribution with those exact proxy settings and it just works!
There's a simple explanation for that: since jdk8u111 Basic authentication for https tunneling is not allowed. To override this for gradle you may pass
systemProp.jdk.http.auth.tunneling.disabledSchemes="" to gradle.properties. More generally you can pass/configure jdk.http.auth.tunneling.disabledSchemes jvm property to empty or remove Basic if already there, or do it globally in net.properties of jre/lib.
Posted by
zmeeagain
at
8:34 pm
0
comments
Monday, October 21, 2019
random ids in idea
$RANDOM$=groovyScript("new Random().nextInt() & Integer.MAX_VALUE"), a short $RANDOM$=groovyScript("new Random().nextInt(65535) + 1"), and a fixed 7-digit, 0-padded number $RANDOM$=groovyScript("String.format(\"%07d\", new Random().nextInt(999999))"). The definition for the latter would be:
<template name="rnd7p0" value="$RANDOM$" description="Generate a random number up to 7 digits, left padded with 0s if needed." toReformat="false" toShortenFQNames="true">
<variable name="RANDOM" expression="groovyScript("String.format(\"%07d\", new Random().nextInt(999999))")" defaultValue="" alwaysStopAt="false" />
<context>
<option name="OTHER" value="true" />
</context>
</template>
Or, you can install the randomness plugin.
Posted by
zmeeagain
at
8:49 pm
0
comments
Friday, June 21, 2019
comments formatting
<pre>s, <blockquote>s and the likes. I tend to disagree. The reason? Ctrl+Q.
Posted by
zmeeagain
at
9:24 am
0
comments
Sunday, June 05, 2016
enums IV
values() lots in your code. Since this allocates a new array every time and this does not get optimized away, you might want to create a local copy, or an immutable collection and use that instead:public enum Day {
MONDAY, TUESDAY;
private static final Day[] values = values();
...
}
or alternatively use an immutable
Set.
Posted by
zmeeagain
at
8:39 pm
0
comments
Thursday, May 26, 2016
enums III
name() method. And it has a very precise meaning. Now imagine:public enum Day {
MONDAY("code1"), TUESDAY("code2");
private final String code;
private Day(String code) {
this.code = name;
}
public String getName() {
return code;
}
}
Now good luck finding out what is Day.name() and what is Day.getName(). You'd be much better off calling this other method of yours getCode(). If name looks like a good name for your attribute, think long and hard to find an alternative.
Posted by
zmeeagain
at
8:46 pm
0
comments
enums II
public enum Days {
MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY,SUNDAY;
}
Then is it:Days day = MONDAY;
or is it:Days days = MONDAY;
How about a set of days? Would you call it days? Is it a set of days or a set of dayss? It can get worse: DaysEnum or DayEnums? Don't call your day days... To be fair such atrocities already exist in jdk, like LayoutFlags or CssFlags (these particular ones thankfully in the bowels of com.sun.javafx). Not one of their best moments.
Posted by
zmeeagain
at
8:17 pm
0
comments
enums I
Month being MonthEnum. What is Monday? A month? Or a monthEnum? Do everyone a favour then and stop calling your enums, well, enums.
Posted by
zmeeagain
at
7:48 pm
0
comments
Monday, December 24, 2012
test your timestamp server with openssl
openssl ts -query -data <filename> -out tsareq.tsrYou may optionally set the policy adding the -policy object_id parameter.View the generated request in human readable form:
openss ts -query -in tsareq.tsr -textSend the request to the timestamp server and store the timestamp response:./tsget -h <timestamp server url> -o tsarep.tsr tsareq.tsrView the reply in human readable form:
openssl ts -reply -in tsarep.tsr -textYou may find that tsget is stored in
/usr/share/ssl/misc.Alternatively, you may also send the timestamp request manually, and have finer control over the protocol and transport headers. One way would be using the almighty curl:
curl -X POST <timestamp server url> -H "Content-Type: application/timestamp-query" -H "Content-Length: <tsareq.tsr length>" --data-binary @tsareq.tsr -v -o tsarep.tsr
Posted by
zmeeagain
at
11:51 am
0
comments
Saturday, September 22, 2012
generate HTML for your web services
wsdl-viewer.xsl. Then use your favourite transformation tool. Yes, it's that simple. I recommend xsltproc, the open-source command line XSLT processing tool, bundled with most Linux distributions, also used in soapUI. Windows fellas can get the binaries prepared by Igor Zlatković. Then simply type:
xsltproc -o the-wsdl-report.html wsdl-viewer.xsl your-wsdl-file.wsdl
Posted by
zmeeagain
at
1:29 pm
3
comments
Saturday, June 11, 2011
Saturday, July 10, 2010
daily tweets
- 19:05 Potokaki beach volley bar. F-awesome. #
Posted by
zmeeagain from twitter
at
11:40 am
0
comments
Friday, July 09, 2010
daily tweets
- 17:22 Psili Ammos Samos. Cooling after having been grilled. #
Posted by
zmeeagain from twitter
at
11:40 am
0
comments
Thursday, July 01, 2010
daily tweets
- 18:50 Google command line (code.google.com/p/googlecl/) still very limited... #
Posted by
zmeeagain from twitter
at
11:40 am
0
comments
Sunday, June 13, 2010
daily tweets
- 20:11 eBay through Backstreet Boys' I Want It That Way adaptation: www.youtube.com/watch?v=UW9bHDy5khQ. LoL! #
Posted by
zmeeagain from twitter
at
11:40 am
0
comments
Saturday, May 01, 2010
daily tweets
- 23:51 Espresso cont.: Syntagma sqr, Athens: 3 euros! What are the margins on that one I wonder... #
Posted by
zmeeagain from twitter
at
11:40 am
0
comments
Friday, April 09, 2010
daily tweets
- 11:37 Doodle: Event scheduling and polling online tool. icio.us/3g0k0v #
Posted by
zmeeagain from twitter
at
11:40 am
0
comments
Friday, April 02, 2010
daily tweets
- 17:45 Agkyra lounge cafe-bookstore-wifi hotspot, Solwnos 124, downtown athens. A gem. #
Posted by
zmeeagain from twitter
at
11:40 am
0
comments
Wednesday, March 10, 2010
daily tweets
- 21:55 Hungry Planet: What the World Eats (tinyurl.com/6mrp5f). 30 families, 24 countries, 600 meals. $494 to $1.44 a week. Awesome. #
Posted by
zmeeagain from twitter
at
12:40 pm
0
comments
Tuesday, March 09, 2010
daily tweets
- 23:33 Corsa is officially on its way to the junkyard. The all new Jazz Exclusive AT seems so much smoother and so much more versatile. #
Posted by
zmeeagain from twitter
at
12:40 pm
0
comments
