Skip to content

Instantly share code, notes, and snippets.

@mgedmin
mgedmin / postfix.py
Last active February 6, 2024 14:21
Ansible module for postfix configuration
#!/usr/bin/python
import subprocess
DOCUMENTATION = '''
---
module: postfix
short_description: changes postfix configuration parameters
description:
- The M(postfix) module changes postfix configuration by invoking 'postconf'.
@janbrohl
janbrohl / ksp-avc.schema.json
Created June 2, 2016 08:35
KSP-AVC version file JSON-Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "AVC-File",
"description": "A KSP-AVC Version file's content",
"type": "object",
"properties": {
"NAME": {
"description": "The display name for the add-on.",
"type": "string"
},
@gwillem
gwillem / ansible-bootstrap-ubuntu-16.04.yml
Created June 16, 2016 21:59
Get Ansible to work on bare Ubuntu 16.04 without python 2.7
# Add this snippet to the top of your playbook.
# It will install python2 if missing (but checks first so no expensive repeated apt updates)
# [email protected]
- hosts: all
gather_facts: False
tasks:
- name: install python 2
raw: test -e /usr/bin/python || (apt -y update && apt install -y python-minimal)
#!/usr/bin/gnuplot
#
# speed - simple speed measuring tool using Debian repository download - plotting
#
# SPDX-FileCopyrightText: 2020 Julian Andres Klode <[email protected]>
#
# SPDX-License-Identifier: AGPL-3.0-or-later
set datafile separator ","
set terminal png size 2560 ,1440
set title "Bandbreitenmessung / Bandwidth measurement - Deutsche Glasfaser"
@gullyn
gullyn / flappy.html
Last active May 4, 2024 15:35
Flappy bird in 205 bytes (improved!)
<body onload=z=c.getContext`2d`,setInterval(`c.width=W=150,Y<W&&P<Y&Y<P+E|9<p?z.fillText(S++${Y=`,9,9|z.fillRect(p`}*0,Y-=--M${Y+Y},P+E,9,W),P))):p=M=Y=S=6,p=p-6||(P=S%E,W)`,E=49) onclick=M=9><canvas id=c>