Skip to content

Instantly share code, notes, and snippets.

View jacqueminv's full-sized avatar

Valentin Jacquemin jacqueminv

View GitHub Profile
@jacqueminv
jacqueminv / BufferingOptionallyClientHttpRequestFactory.java
Last active August 8, 2018 09:50 — forked from markhobson/LoggingInterceptor.java
Spring RestTemplate interceptor to optionnally log HTTP traffic.
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.http.HttpMethod;
import org.springframework.http.client.BufferingClientHttpRequestFactory;
import org.springframework.http.client.ClientHttpRequestFactory;
import java.net.URI;
public class BufferingOptionallyClientHttpRequestFactory extends BufferingClientHttpRequestFactory {
@jacqueminv
jacqueminv / bvr-webcomponent.md
Last active January 20, 2016 12:51
BVR webcomponent
@jacqueminv
jacqueminv / gist:42f7079c422974a382cc
Last active July 18, 2017 13:21
Oracle SQL milliseconds to date
select to_date('1970-01-01', 'YYYY-MM-DD') + (:milliseconds / 86400000) from dual;
-- charset
select * from nls_database_parameters where parameter='NLS_CHARACTERSET';
-- FULL table sizes
SELECT owner,
table_name,
TRUNC (SUM (bytes) / 1024 / 1024 / 1024) GB,
ROUND (ratio_to_report (SUM (bytes)) OVER () * 100) Percent
@jacqueminv
jacqueminv / ecma-history
Last active August 29, 2015 14:07
ECMAScript (ECMA-262) versions history
+-------+-------------------+
|Version|Date of publication|
+-------+-------------------+
|1 |June 1997 |
+-------+-------------------+
|2 |August 1998 |
+-------+-------------------+
|3 |December 1999 |
+-------+-------------------+
|5.1 |June 2011 |
@jacqueminv
jacqueminv / Clickjacking
Last active August 29, 2015 14:04
Clickjacking thanks to fully translucent elements still receiving click events
An element with an `opacity: 0` still triggers `click` events.
http://jsfiddle.net/6U25n/
@jacqueminv
jacqueminv / Per-line text padding
Last active August 29, 2015 14:01
Multiline text with set width and padding per line
Use the `box-shadow` property to add the padding (http://codepen.io/jacqueminv/pen/hKmdH).
HTML:
<div>
<span>A multiline text that we want to define a graphical padding per line</span>
</div>
CSS:
@jacqueminv
jacqueminv / gist:3875547
Last active October 11, 2015 14:48
CSS: variable wrapper with equal height columns

setting "fixed" padding is an issue, look here: http://jsfiddle.net/GTY8P/

.wrapper {
    overflow: hidden;
}
.wrapper > div {
    width: 50%;
    float: left;
    padding-bottom: 999999em;

margin-bottom: -999999em;

@jacqueminv
jacqueminv / gist:3822289
Created October 2, 2012 18:45
JavaScript: XML parser in browser
//from http://stackoverflow.com/a/8412989
var parseXml;
if (typeof window.DOMParser != "undefined") {
parseXml = function(xmlStr) {
return ( new window.DOMParser() ).parseFromString(xmlStr, "text/xml");
};
} else if (typeof window.ActiveXObject != "undefined" &&
new window.ActiveXObject("Microsoft.XMLDOM")) {
@jacqueminv
jacqueminv / gist:3790412
Created September 26, 2012 20:31
CSS: clearfix
:after {
content: "";
display: table;
clear: both;
}