Skip to content

Instantly share code, notes, and snippets.

View gretro's full-sized avatar

Gabriel Lemire gretro

View GitHub Profile
@gretro
gretro / docker-compose.yml
Last active March 7, 2018 02:11
Simple dev Elasticsearch
version: '3'
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:6.2.2
container_name: elasticsearch
environment:
- cluster.name=docker-cluster
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
ulimits:
@gretro
gretro / index.js
Last active June 26, 2017 18:13
Vorpal REPL
const vorpal = require('vorpal');
const cli = vorpal();
cli
.command('newprovider <handle> <name>', 'Creates a new provider, eg. `newprovider new "New provider"`')
.action(function(args, cb) {
const { handle, name } = args;
console.log(`Creating provider with handle ${handle} and name ${name}`);
this.prompt([
@gretro
gretro / clamp.scss
Last active June 14, 2017 21:22
CSS multi-line text Clamp
// Adapted from https://css-tricks.com/line-clampin/#article-header-id-1
@mixin clamp-text($line-height, $line-count) {
height: $line-height * $line-count;
position: relative;
overflow: hidden;
&:after {
content: "";
text-align: right;
position: absolute;