Skip to content

Instantly share code, notes, and snippets.

Cyril Auburtin caub

Block or report user

Report or block caub

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
View PropsType.ts
import PropTypes from 'prop-types';
type Omit<T, K> = Pick<T, Exclude<keyof T, K>>;
type Defined<T> = T extends undefined ? never : T;
* Get the type that represents the props with the defaultProps included.
* Alternatively, we could have done something like this:
View .light
validateNumber() {
if [[ $1 == *[0-9]* && $1 =~ $regexp ]]; then
echo "$1"
printf >&2 '%s is not a valid number\n' "$1"
View .gitconfig
email =
name = caub
a = add --all
au = add -u
b = branch
br = branch -r
amend = commit --amend -C HEAD
eunomie /
Created Apr 27, 2017
How to send containers log to ELK using gelf log driver

Send docker logs to ELK through gelf log driver

There's so many way to send logs to an elk... logspout, filebeat, journalbeat, etc.

But docker has a gelf log driver and logstash a gelf input. So here we are.

Here is a docker-compose to test a full elk with a container sending logs via gelf.

phillip-haydon / jsonb_merge.sql
Created Dec 6, 2016
Deep Merge two jsonb documents in PostgreSQL
View jsonb_merge.sql
var mergeJSON = function (target, add) {
function isObject(obj) {
if (typeof obj == "object") {
for (var key in obj) {
if (obj.hasOwnProperty(key)) {
return true; // search for first object prop
ebidel / fancy-tabs-demo.html
Last active Apr 3, 2020
Fancy tabs web component - shadow dom v1, custom elements v1, full a11y
View fancy-tabs-demo.html
function execPolyfill() {
// CustomElementsV1.min.js v1 polyfill from
Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at
The complete set of authors may be found at
staltz /
Last active Apr 4, 2020
The introduction to Reactive Programming you've been missing
rwaldron /
Last active Sep 30, 2019, mapFn = undefined)
Zirak / helloWorld.js
Last active Apr 16, 2018
The Hello World of the future
View helloWorld.js
* The Hello World of tomorrow
* Copyright (C) 2012 Scruffy
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* This program is distributed in the hope that it will be useful,
You can’t perform that action at this time.