edwin

Holycow Sarinah, One of the Best Steak in Jakarta

Kemaren gw coba iseng-iseng mampir ke Holycow Sarinah, Jakarta. Lokasinya emang agak-agak susah, tapi patokannya adalah dia di gedung sebelah kanan di perempatan Bank Indonesia, kalo mo ke arah Kebon Sirih. Tempatnya memang agak kecil namun cozy dan karena berada di lantai 5, jadi view-nya dapet bgt. Ruangannya juga ada 2 tipe, indoor dan outdoor, jadi yg hobbynya smoking bisa langsung ambil yg outdoor. Dan soal pelayanan menurut gw, udah cukup baik dan ramah.

holycow sabang

Gw coba order Buddy’s Special Medium Rare, dan jujur gw sangat-sangat puas, dagingnya so juicy, pink empuk bgt. And believe me, ini mungkin salah satu steak paling enak yg pernah gw santap. Untuk harga, ya masih sesuai sama budget lah, total makan + minum ice lemon tea, abis sekitar 150k IDR.

Overall, very-very recommended.

nb.
kalo bawa mobil, siap-siap susah parkir-nya yah. Gedungnya rada sempit jadi bisa rebutan lahan parkir, atau silahkan parkir di jalan sabang dan kemudian jalan kaki kesini.

Fixing WordPress’ Syntaxhighligther and Bootstrap Incompatibility

Today’s i just updated my wordpress’ theme, from the old one to a much better one. I like the newer one because it has more flexibility, and also for its responsive design.

But i had an issue, somehow my syntaxhighlighter gives an extra row space and it happen only in Firefox. Here is the screenshot,

syntax highlighter issue

Somehow my latest wordpress theme shows incompatibility with Sytaxhighlighter css file. After sometime googling, i found out that i need to override a css property so my Syntaxhighlighter would works.

div.syntaxhighlighter .container:before,div.syntaxhighlighter .container:after {
    content:none;
}

Well i hope it helped others, have fun 🙂

Binding Date Property to SpringMVC’s @ModelAttribute

Let say i have this java bean,

public class MyBean implements Serializable {
    private Integer id;
    private String userid;       
    private Date contacttime;
	
	// other setter and getter	

And i have a SpringMVC Controller like this, using @ModelAttribute as the method’s parameter,

@RequestMapping(value = "/doSomething", method = RequestMethod.POST)
public @ResponseBody Object doSomething(@ModelAttribute MyBean myBean) {
	// do something
}

Im sending HTTP Post which format is like this

id=2&
userid=3abc&
contacttime=130314101010

But it shows error on my server side, which looks like this,

Failed to convert from type java.lang.String to type java.util.Date for value '130314101010'; 
nested exception is java.lang.IllegalArgumentException

Usually, i have to manually use SimpleDateFormat to parse my “ddMMyyHHmmss” String into Date, but SpringMVC provide a very elegant way of handling with this kind of conversion. Just by using @DateTimeFormat

import org.springframework.format.annotation.DateTimeFormat;

public class MyBean implements Serializable {
    private Integer id;
    private String userid;       
	
	@DateTimeFormat(pattern = "ddMMyyHHmmss")
    private Date contacttime;
	
	// other setter and getter	

Dont forget to include JodaTime on your pom.xml

<dependency>
	<groupId>joda-time</groupId>
	<artifactId>joda-time</artifactId>
	<version>2.3</version>
</dependency>

If not, you will find this kind of error,

org.springframework.core.convert.ConversionFailedException: Failed to convert from type java.lang.String to type @org.springframework.format.annotation.DateTimeFormat java.util.Date for value '130314101010'; nested exception is java.lang.IllegalStateException: JodaTime library not available - @DateTimeFormat not supported

Have fun with SpringMVC 😀

How to Sniff Network Packages on HPUX Filtered By A Specific IP

Well on most of Linux distros, it’s very easy sniffing network packages using tcpdump, but on this case i need to sniff packages on HPUX, which doesnt have tcpdump installed.

So basically i have 2 options, install tcpdump on my hpux (which is very tricky because of limitation the sysadmin gave me), or simply by using HPUX’s build function for network sniffing, which is “nettl”.

On this example, im trying to sniff packages to and from a specific ip, first is creating a file which contain the target ip.

filter ip_saddr 192.168.0.11
filter ip_daddr 192.168.0.11

and i save it as /tmp/myfilter.

Next step is running nettl,

#this command is to start nettl
nettl -tn 0x30800000 -e ns_ls_ip -size 1024 -tracemax 99999 -f /tmp/raw.tr

#this command is to check nettl status
nettl -status TRACE

#this command is to filter sniffed network packages using filter
netfmt -N -n -l -c /tmp/myfilter -f /tmp/raw.tr.TRC000 > /tmp/trace.output

#this command is to stop nettl
nettl -tf -e all