This is a post where i want to collect some new expressions i’m learning on my way to Java 8. Hopefully i’ll keep updating it… Use an IntStream to generate an Array with constant default values // The "() -> 23" is a lambda that matches the functional interface of a Supplier // The the […]
At the end of last year, Spring Security 3.2 was released and brought a lot of new features, among them a built-in “Cross Site Request Forgery” protection”. Nearly two years earlier i wrote my CSRF protection implementation with Spring Security 3.1, have a look here. I really like the built-in implementation and most of it […]
While my project is full of pictures, this blog lacks some images and stuff… So for the last post in 2013 and the last commit being from the night before, i’ll add some fun content, a time-lapse of 1433 gitshots since July, 21st. Gitshot? What the heck is a git shot? This post-commit hook: #!/usr/bin/env […]
Some useful SQL Snippets: Oracle Create a date without any formatting hassle (like to_date): SELECT DATE’2014-01-01′ FROM dual;select date’2014-01-01′ from dual; Extract values as numbers from a date object SELECT EXTRACT (YEAR FROM DATE’2013-05-06’) FROM dual; SELECT EXTRACT (MONTH FROM DATE’2013-05-06’) FROM dual; SELECT EXTRACT (DAY FROM DATE’2013-05-06’) FROM dual;select extract (year from date’2013-05-06′) from […]
For the last 6 months i’ve been archiving all my paper work (OCR’ing and than trashing it) to a personal documents repository. There are some document managers out there but every single one felt like overkill to me, so i just stick to a pretty simple directory structure which is enough for me. Although i […]