Skip to content

Instantly share code, notes, and snippets.


Anthonny Quérouil anthonny

View GitHub Profile
magopian / gist:297d20e95b49daf3ad934e36b1855e82
Created Nov 28, 2018
elm decoder very helpful to debug decoders used in event handlers (thanks @JoelQ on the elm slack)
View gist:297d20e95b49daf3ad934e36b1855e82
module Main exposing (main)
import Html exposing (Html, text)
import Json.Decode as Decode exposing (Decoder)
loggingDecoder : Decoder a -> Decoder a
loggingDecoder realDecoder =
|> Decode.andThen
dudleycarr / docker-compose.yml
Created Sep 30, 2015
Docker Compose for nsq, StatsD, Graphite, and Grafana
View docker-compose.yml
image: hopsoft/graphite-statsd
- 80
- 8125/udp
- 8080:80
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));
cletusw / .eslintrc
Last active Jan 13, 2021
ESLint Reset - A starter .eslintrc file that resets all rules to off and includes a description of what each rule does. From here, enable the rules that you care about by changing the 0 to a 1 or 2. 1 means warning (will not affect exit code) and 2 means error (will affect exit code).
View .eslintrc
"ecmaFeatures": {
"binaryLiterals": false, // enable binary literals
"blockBindings": false, // enable let and const (aka block bindings)
"defaultParams": false, // enable default function parameters
"forOf": false, // enable for-of loops
"generators": false, // enable generators
"objectLiteralComputedProperties": false, // enable computed object literal property names
dendrochronology / styles.less
Last active Jan 18, 2019 styles for rainbow indent guides. Yay rainbows!
View styles.less
* Atom Stylesheet
* .generate-indents(): makes pretty indent guides.
* Enable 'Settings' -> 'Show Indent Guide' and taste the rainbow!
// Default and base colors for indent guides
@indentColor: hsla(345, 100%, 55%, .3); // Manipulate this to make pretty
dgoguerra /
Last active Jan 22, 2021
Setup p4merge as difftool and mergetool on Windows

Setting up p4merge as diff and merge tool on Windows. Tried for Git version 1.8.4.msysgit.0.

Two alternatives are explained: using the command line, and directly editing the config file.

Setting up from the command line

Being the installation path "C:Program Files\Perforce\p4merge.exe", just run:

$ git config --global diff.tool p4merge
coolaj86 /
Last active Jan 21, 2021
How to publish packages to NPM

Getting Started with NPM (as a developer)

If you haven't already set your NPM author info, now you should:

npm set "Your Name"
npm set ""
npm set ""

npm adduser