Provider | Singleton | Instantiable | Configurable |
---|---|---|---|
Constant | Yes | No | No |
Value | Yes | No | No |
Service | Yes | No | No |
Factory | Yes | Yes | No |
Decorator | Yes | No? | No |
Provider | Yes | Yes | Yes |
This file contains hidden or 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
#!/bin/bash | |
# Sometimes you want to sleep until a specific time in a bash script. This is useful, for instance | |
# in a docker container that does a single thing at a specific time on a regular interval, but does not want to be bothered | |
# with cron or at. The -d option to date is VERY flexible for relative times. | |
# See | |
# https://www.gnu.org/software/coreutils/manual/html_node/Relative-items-in-date-strings.html#Relative-items-in-date-strings | |
# For details | |
# ALPINE USERS: You will need to install coreutils, as the built-in busybox date does not handle -d correctly. |
This file contains hidden or 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/python | |
from ansible.module_utils.basic import * | |
def _set_value(module, path, value): | |
val = module.run_command(["dconf", "write", path, value])[1].strip() | |
def _get_value(module, path): |
This file contains hidden or 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
# Inspired by: | |
# - https://gist.github.com/goldsmith/7262122 | |
# - https://gist.github.com/brousch/6589386 | |
#### Some hints #### | |
# Currently kivy apps only work on monitor 1 (multiple monitor setup) | |
# You have to place the terminal which runs kivy on the monitor 1 or make the app fullscreen. | |
# Make sure you have the "command line tools" for mavericks installed! | |
# (xcode-select --install) |