Skip to content

Instantly share code, notes, and snippets.

View srgvg's full-sized avatar
👓
ENOSTATUS

Serge van Ginderachter srgvg

👓
ENOSTATUS
View GitHub Profile
@srgvg
srgvg / ansible_inventory_plugin_example.py
Created May 26, 2020 09:17
This is a boiler plate example that could be used to write an inventory plugin It shows the use case of retrieving data from a remote API, which might be a slow or costly action, you may want to cache. What needs to be initialized in Ansible to use a cache is shown, too.
# This is a boiler plate example that could be used to write an inventory plugin.
# It shows the use case of retrieving data from a remote API, which might be a
# slow or costly action, you may want to cache.
# What needs to be initialized in Ansible to use a cache is shown, too.
# This example by by Serge van Ginderachter <serge@vanginderachter.be>
# Copyright (c) 2017 Ansible Project
# Copyright (c) 2020 Serge van Ginderachter <serge@vanginderachter.be>
# GNU General Public License v3.0+
# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
@srgvg
srgvg / .font.conf
Created July 26, 2021 11:39 — forked from AhmedMostafa16/.font.conf
My .font.conf for perfect font rendering
<?xml version="1.0"?><!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<dir>~/.fonts</dir>
<!--
Documented at
http://linux.die.net/man/5/fonts-conf
To check font mapping run the command at terminal
$ fc-match 'helvetica Neue'
@srgvg
srgvg / util-bash-vuln-upgrade.yml
Last active August 16, 2019 13:35
deb playbook to fix CVE-2014-6271 bash remote execution vulnerability
---
- hosts: all
gather_facts: false
name: CVE-2014-6271 bash vulnerability fix
tasks:
- name: check bash fix
command: env x='() { :;}; echo vulnerable' bash -c "echo this is a test"
register: command_result
changed_when: False
@srgvg
srgvg / keybase.md
Last active March 17, 2018 17:33
keybase.md

Keybase proof

I hereby claim:

  • I am srgvg on github.
  • I am svg (https://keybase.io/svg) on keybase.
  • I have a public key ASAZ1BgJggVMr7x-pU7k51bg9-7JmQDQ2pEL-kQsyOa-Ogo

To claim this, I am signing this object:

@srgvg
srgvg / fresh-chrome.sh
Created November 21, 2016 09:06 — forked from stuartsierra/fresh-chrome.sh
Launch new instances of Google Chrome on OS X with isolated cache, cookies, and user config
#!/usr/bin/env bash
# fresh-chrome
#
# Use this script on OS X to launch a new instance of Google Chrome
# with its own empty cache, cookies, and user configuration.
#
# The first time you run this script, it will launch a new Google
# Chrome instance with a permanent user-data directory, which you can
# customize below. Perform any initial setup you want to keep on every
No config file found; using defaults
[WARNING]: Host file not found: /etc/ansible/hosts
[WARNING]: provided hosts list is empty, only localhost is available
PLAY [localhost] ***************************************************************
TASK [joeri : uri] *************************************************************
@srgvg
srgvg / hosts
Last active May 12, 2016 04:52
ansible/issues/12395
raven.toroid.org
magpie.toroid.org
@srgvg
srgvg / play.yml
Last active December 26, 2015 04:19
- hosts: localhost
gather_facts: false
connection: local
vars:
list1:
- 'a'
- 'b'
- 'c'
- 'd'
@srgvg
srgvg / output
Created September 9, 2013 21:49
tests for subelements lookup plugin
$ ansible-playbook play.yml -v
Monday 09 September 2013 23:40:57 +0200
PLAY [localhost] **************************************************************
Monday 09 September 2013 23:40:57 +0200
TASK: [list] ******************************************************************
Monday 09 September 2013 23:40:57 +0200
ok: [localhost] => (item=({'name': 'foo', 'desc': 'FooBar'}, 1)) => {"item": [{"desc": "FooBar", "name": "foo"}, 1], "msg": "foo(FooBar) gets key 1"}
ok: [localhost] => (item=({'name': 'foo', 'desc': 'FooBar'}, 2)) => {"item": [{"desc": "FooBar", "name": "foo"}, 2], "msg": "foo(FooBar) gets key 2"}