This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* This is a node.js script supposed to run regularly on a docker swarm node and allows | |
* containers in a macvlan (or ipvlan) network to have static ip addresses. This is currently | |
* not possible using Docker Swarm. It doesn't use any external dependencies and instead | |
* calls docker cli commands directly. So, if you want to run it in a container, make | |
* sure to bind the docker socket into the container as well. | |
* | |
* It works by reading a `macvlan-static-ip` label from the service, e.g. 192.168.0.80 | |
* (This is the desired ip address for the resulting container). And then it "starts" | |
* and "stops" containers in the right order to ensure they get their configured ip. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# -*- encoding : utf-8 -*- | |
# A simple script to search for tweets that contain certain hashtags and print them on a POS58 printer. | |
# Make sure the printer is connected and you can print by writing to /dev/usb/lp0 (or similar) | |
# | |
# Run `ruby ruby_pos58_tweetprinter.rb` for using the streaming API: instant printing. | |
# Run `ruby ruby_pos58_tweetprinter.rb get` for using the good old REST API. You can put this in a cronjob. | |
# | |
# Copyright (c) 2015 http://github.com/kriskbx |