Skip to content

Instantly share code, notes, and snippets.

View resmo's full-sized avatar
:octocat:

René Moser resmo

:octocat:
View GitHub Profile
---
- hosts: localhost
connection: local
tasks:
- name: foobar
shell: echo foobar
notify: event_foobar
handlers:
- hosts: localhost
gather_facts: no
tasks:
- name: copy an ssl cert
shell: echo cert has been changed
notify:
- hosts: localhost
gather_facts: no
handlers:
@resmo
resmo / timeout.py
Created January 13, 2016 19:56
shows a timer counting down in a window using tinker
#!/usr/bin/python
import Tkinter as tk
import time
class App():
def __init__(self):
self.timer = 60
self.root = tk.Tk()
self.label = tk.Label(text="")
self.label.pack()
@resmo
resmo / sync.sh
Created September 11, 2015 07:10
#!/bin/bash
cp ../ansible-modules-extras/cloud/cloudstack/cs_*.py .
str='from ansible.module_utils.cloudstack import *'
for i in $(ls cs_*.py); do
sed -i -e "/$str/r ansible_cloudstack_utils.py" -e "/$str/d" $i
done
@resmo
resmo / config
Created May 5, 2015 12:03
Proxy command
Host 10.100.9.* 10.100.209.*
User root
IdentityFile ~/.ssh/id_rsa_cloudstack
StrictHostKeyChecking no
ProxyCommand ssh -q -o ControlPersist=no cloudstack-mgmt.example.com -W %h:3922

Keybase proof

I hereby claim:

  • I am resmo on github.
  • I am resmo (https://keybase.io/resmo) on keybase.
  • I have a public key whose fingerprint is 5826 19B1 A4F6 AE8B C58A D848 8306 965B E6D6 331D

To claim this, I am signing this object:

@resmo
resmo / check_glue.sh
Last active August 29, 2015 13:57
checks if NS in zone and GLUE record are identical
#!/bin/bash
OK=0
WARNING=1
CRITICAL=2
UNKNOWN=3
domain=$1
if [[ -z "$domain" ]]
@resmo
resmo / host.md
Last active December 28, 2015 18:19
host module features

change ip

/etc/hosts:

127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6

task:

@resmo
resmo / host-test.yml
Created November 15, 2013 13:16
ansible host module testing playbook
---
- hosts: localhost
connection: local
gather_facts: no
remote_user: root
tasks:
- name: test add a record
host: hostname=foobar ip=192.168.123.1
register: result
failed_when: not result.changed
@resmo
resmo / base.php
Created January 14, 2013 12:31
Laravel 3 base model. I usually use it to extend from it.
<?php
class Base extends Eloquent {
/**
* @var
*/
public static $timestamps = true;
/**