$ pdnsutil create-zone ds9a.nl ns1.powerdns.com
Creating empty zone 'ds9a.nl.'
Also adding one NS record
$ pdnsutil add-record ds9a.nl @ A 1.2.3.4
$ pdnsutil add-record ds9a.nl "*" CNAME ds9a.nl
$ pdnsutil list-zone ds9a.nl
*.ds9a.nl. 3600 IN CNAME ds9a.nl.
ds9a.nl. 3600 IN A 1.2.3.4
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
<ul> | |
{% for row in rows %} | |
<li class="{{ loop.cycle('odd', 'even') }}">{{ row }}</li> | |
{% endfor %} | |
</ul> |
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
--- | |
- name: Nueva VM, instala Apache y envia notificacion a Slack | |
hosts: localhost | |
user: root | |
sudo: true | |
## Prompt que nos pregunta como queremos llamar a la nueva maquina virtual | |
vars_prompt: | |
- name: "guest" | |
prompt: "Nombre VM?" |
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
# modified from https://gist.github.com/bsmithgall/372de43205804a2279c9 | |
SMALL_WORDS = re.compile(r'^(a|an|and|as|at|but|by|en|etc|for|if|in|nor|of|on|or|per|the|to|vs?\.?|via)$', re.I) | |
SPACE_SPLIT = re.compile(r'[\t ]') | |
# taken from http://stackoverflow.com/a/267405 | |
CAP_WORDS = re.compile(r'^M{0,4}(CM|CD|D?C{0,3})(XC|XL|L?X{0,3})(IX|IV|V?I{0,3})$') | |
PUNC_REGEX = re.compile(r'[{}]'.format(re.escape(string.punctuation))) | |
# taken from python-titlecase: https://github.com/ppannuto/python-titlecase/blob/master/titlecase/__init__.py#L27 | |
UC_INITIALS = re.compile(r'^(?:[A-Z]{1}\.{1}|[A-Z]{1}\.{1}[A-Z]{1})+$', re.I) | |
def better_title(string): |
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
The problem: | |
I wanted to use the jinja 'map' filter to modify each item in a string, in this simple | |
example, adding '.conf' to each item. | |
The 'format' filter in jinja takes arguments (value, *args, **kwargs). Unfortunately, | |
it uses 'value' as the pattern. When called inside map 'value' is the current item in | |
the list, or in other words *args as far as format is concerned. So it's the wrong way | |
around. |
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/local/bin/python | |
import xmlrpclib | |
import ConfigParser | |
import os | |
from sys import exit | |
class GandiDomain(): | |
def __init__(self, apikey, domain): |
Mercurial Commands
Commands | Description |
---|---|
hg pull | get latest changes like git pull use flags like -u IDK why yet |
hg add | only for new files |
hg commit | add changes to commit with -m for message just like git |
hg addremove | adds new files and removes file not in your file system |
hg incoming | see changes commited by others |
hg outgoing | see local commits |
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
- Notes on avamar client configuration using command line | |
Generally scheduling of clients, setting retentions and datasets are done via groups (best practice). | |
It is recommended to work with the backup team to set up an agreed upon set of schedules, retentions and datasets | |
and assign these to group policies as needed. | |
With this in mind it is likely that you will only really need the command to list the group policies, add a client to a group and start a backup. |
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 bash | |
data="$( | |
cat "$1" \ | |
| sed 's/"/\\"/g' \ | |
| sed ':a;N;$!ba;s/\n/\\n/g' \ | |
)" | |
if [[ -z "$2" ]]; then | |
context='' |
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 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. | |
# |