Skip to content

Instantly share code, notes, and snippets.

View khusseini's full-sized avatar
🍉
Free Palestine

Khairi Husseini khusseini

🍉
Free Palestine
View GitHub Profile
@t3chnoboy
t3chnoboy / gist:8322246
Created January 8, 2014 18:55
Convert all files in folder to utf-8 using iconv
# http://stackoverflow.com/questions/4544669/batch-convert-latin-1-files-to-utf-8-using-iconv
find . -type f -exec bash -c 'iconv -f iso-8859-1 -t utf-8 "{}" > /path/to/destination/"{}"' \;
FROM busybox
MAINTAINER Ric Lister <rlister@gmail.com>
## busybox wget cannot do https, so grab curl binary
ENV CURL_VERSION 7.30.0
RUN (wget -O - http://www.magicermine.com/demos/curl/curl/curl-${CURL_VERSION}.ermine.tar.bz2 | bunzip2 -c - | tar xf -) \
&& mv /curl-${CURL_VERSION}.ermine/curl.ermine /bin/curl \
&& rm -rf /curl-${CURL_VERSION}.ermine
WORKDIR /app
@rkrzr
rkrzr / auto_tags.py
Last active April 10, 2024 11:14
Automatically generate ansible tags of the same name for each role in a playbook
"""
This module implements an Ansible plugin that is triggered at the start of a playbook.
The plugin dynamically generates a tag for each role. Each tag has the same name as its role.
The advantage of this is that it saves you some boilerplate, because you don't have to wrap
all tasks of a role in an additional block and assign a tag to that.
Additionally, it works automatically when you add new roles to your playbook.
Usage is exactly the same as without this plugin: