Skip to content

Instantly share code, notes, and snippets.

View ignlg's full-sized avatar
👾
Killing invaders

Ignacio Lago ignlg

👾
Killing invaders
View GitHub Profile
@ignlg
ignlg / example.js
Last active October 21, 2018 15:05
Fixes "TypeError: JSON.stringify cannot serialize cyclic structures" error when exporting to JSON a KeystoneJS model/list including virtuals.
var modelCleanCyclic = require('./modelCleanCyclic');
var Example = new keystone.List('Example', {});
Example.schema.set('toJSON', {
virtuals: true,
transform: modelCleanCyclic.transformer
});
@ignlg
ignlg / dokku-container-name.sh
Created August 5, 2014 07:58
Dokku apps' container name: Creates all NAME files to assign container names with the dokku-name plugin.
#!/bin/bash
###
# Dokku apps' container name
#
# Creates all NAME files to assign container names with the dokku-name plugin.
#
# Usage: ./dokku-container-name.sh [suffix]
#
# LICENSE:
#
@ignlg
ignlg / docker-cleanup.sh
Created August 5, 2014 07:39
Docker cleanup script: Removes all the containers (error for running ones) and all the unnamed (<none>) images (error for images attached to a running container)
#!/bin/bash
###
# Docker cleanup script
#
# Cleans all the containers (error for running ones) and all the
# unnamed images (error for images attached to a running container)
#
#
# LICENSE:
#
@ignlg
ignlg / text-to-redis.coffee
Last active January 4, 2016 03:28
Text to Redis.A handy tool to convert a batch of Redis Commands for Mass Insert/Exec. It converts an input text with Redis Commands to an output text in Redis Protocol.
#!/usr/bin/env coffee
###
Text-to-Redis
Author: Ignacio Lago @ignlg
Version: 1.2
A handy tool to convert a batch of Redis commands for mass insert/exec.