Skip to content

Instantly share code, notes, and snippets.

View stefanteixeira's full-sized avatar

Stefan Teixeira stefanteixeira

  • Toptal
  • Rio de Janeiro
View GitHub Profile
@pa-s
pa-s / hodmanWorld.js
Created December 16, 2014 22:20
Hodman Article - hodmanWorld.js
var cabbie = require('cabbie');
var hodman = require('hodman');
var assert = require('assert');
var driver = cabbie('http://localhost:4444/wd/hub',
{ browserName:'firefox' },
{ mode: 'sync' });
var driverAdapter = new hodman.driverAdapters.Cabbie(driver);
FIELDS = ['cmd', 'command', 'start', 'end', 'delta', 'msg', 'stdout', 'stderr']
def human_log(res):
if type(res) == type(dict()):
for field in FIELDS:
if field in res.keys():
encoded_field = res[field].encode('utf-8')
print '\n{0}:\n{1}'.format(field, encoded_field)
@anildigital
anildigital / gist:862675ec1b7bccabc311
Created July 26, 2014 18:27
Remove dangling docker images
docker rmi $(docker images -q -f dangling=true)
# This gist is compatible with Ansible 1.x .
# For Ansible 2.x , please check out:
# - https://gist.github.com/dmsimard/cd706de198c85a8255f6
# - https://github.com/n0ts/ansible-human_log
# 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.
#