Skip to content

Instantly share code, notes, and snippets.

Germano Giudici GermanoGiudici

Block or report user

Report or block GermanoGiudici

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
mpj /
Last active Apr 28, 2016
REALLY quick and dirty static file dev server


node dirtyserve.js

The point your browser to


and the server will try to serve that file from the local server.

public <T> T streamQuery(String sql, Function<Stream<SqlRowSet>, ? extends T> streamer, Object... args) {
return jdbcTemplate.query(sql, resultSet -> {
final SqlRowSet rowSet = new ResultSetWrappingSqlRowSet(resultSet);
final boolean parallel = false;
// The ResultSet API has a slight impedance mismatch with Iterators, so this conditional
// simply returns an empty iterator if there are no results
if (! {
return streamer.apply(, parallel));
staltz /
Last active Nov 22, 2019
The introduction to Reactive Programming you've been missing
MartinPaulo /
Last active Jun 27, 2017
Devstack IceHouse in a Vagrant box...

Boxing devstack with Vagrant...

The simplest way is to install the latest version of Vagrant Then just follow the instructions given by Christian Berendt in his blog entry: (you might want to reduce the memory and the number of CPU's, dependent on your hardware - also, don't forget the warning about waiting for 10+ minutes once you have fired the whole thing up)

To install a specific branch of devstack

These are the steps I followed to install the icehouse branch of devstack into a Vagrant controlled VM

NV /
Last active Apr 30, 2019
Prepend the debugger statement to a function as easy as stopBefore('Element.prototype.removeChild'). Works in Chrome DevTools and Safari Inspector, doesn’t work in Firebug‘s and Firefox Developer Tools‘ console (I don’t know why). Works as a standalone script everywhere.


2min screencast


stopBefore(document, 'getElementById')
stopBefore('document.getElementById') // the same as the previous
stopBefore(Element.prototype, 'removeChild')
nicdaCosta / Grep.js
Last active Jul 10, 2019
Basic function that searches / filters any object or function and returns matched properties.
View Grep.js
Author : Nic da Costa ( @nic_daCosta )
Created : 2012/11/14
Version : 0.2
(c) Nic da Costa
License : MIT, GPL licenses
Basic function that searches / filters any object or function and returns matched properties.
dmethvin / gist:1676346
Created Jan 25, 2012
Breakpoint on access to a property
View gist:1676346
function debugAccess(obj, prop, debugGet){
var origValue = obj[prop];
Object.defineProperty(obj, prop, {
get: function () {
if ( debugGet )
return origValue;
You can’t perform that action at this time.