Skip to content

Instantly share code, notes, and snippets.

@jpmens
jpmens / tim-books-two.txt
Created May 26, 2018 20:09
Tim booked two
A priest and a shepherd from Australia participate in a TV game. After answering all the questions, there is a tie.
So both are given one final assignment. It is to write a poem in three minutes, using the word "Timbuktu".
It is a city in Africa.
The priest returns with the fruit of his inspiration:
"I was a father all my life,
I had no children, had no wife,
I read the bible through and through
on my way to Timbuktu ... "
- hosts: localhost
gather_facts: no
connection: local
vars:
customer:
- name: cust1
events:
- name: event 1
letter: birthday
- name: event 2
@jpmens
jpmens / hare.c
Last active February 27, 2024 01:08
hare / hared
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <netdb.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <memory.h>
#include <sys/socket.h>
/*
@jpmens
jpmens / MANIFEST.in
Last active February 24, 2024 20:15 — forked from karlp/MANIFEST.in
Including git version in setup.py files. (Requires at least _one_ tag in the repo) Normally used to make things like, "python setup.py sdist" give you a predictable name for files. Normally used with tags on the repo like 0.1 or 2.3.0 You should add RELEASE-VERSION to MANIFEST.in so that end users of the tarball can use this too.
include RELEASE-VERSION
include version.py
# Anything else you normally use
$ cat numbers.yml
- hosts: localhost
vars:
i: "17" # strings here like from register, etc.
f: "92.87"
s: "my name"
tasks:
- set_fact:
numbers:
my_i: "{{ i }}"
2024-02-04T07:13:10Z lwt {"_type":"lwt"}
1707030792: New client connected from 95.223.106.181:1388 as jane-nokia (p1, c0, k60, u'jane').
1707030792: owntracks/jane/nokia
1707030792: Sending CONNACK to jane-nokia (0, 0)
1707030792: Received SUBSCRIBE from jane-nokia
1707030792: jane-nokia 2 owntracks/+/+
1707030792: jane-nokia 2 owntracks/+/+/event
1707030792: jane-nokia 2 owntracks/+/+/info
1707030792: owntracks/jane/nokia/cmd (QoS 2)
1707030792: jane-nokia 2 owntracks/jane/nokia/cmd
@jpmens
jpmens / mexico.csv
Created January 26, 2024 08:55
Mexico 2023/2024 Points of Interest
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 8.
lat,lon,"name","isotst","address"
50.046365,8.572055,"FRA gate B28, LH498","2023-12-17T12:27:43Z","Terminal 1 Flugsteig B, Ankunftbogen, 60549 Frankfurt, Germany"
17.065921,-96.717023,"Oaxaca, hotel Los Pilares","2023-12-20T02:43:42Z","Los Pilares, C las Curtidurías 721-A, Colonia América Norte, 68080 Oaxaca, OAX, Mexico"
17.062621,-96.724276,"café Brujula; Pepe Limón","2023-12-20T19:50:55Z","Monte de Piedad, Avda de José María Morelos 703, Oaxaca de Juárez, 68000 Oaxaca de Juárez, OAX, Mexico"
16.921599,-96.362901,"Mitla, downtown","2023-12-21T19:08:04Z","Don Cenobio, Benito Juárez, Mitla, 70430 San Pablo Villa de Mitla, OAX, Mexico"
16.828945,-93.095473,"Mirador Cañón del Sumidero","2023-12-22T17:01:54Z","Mirador, Calzada al Sumidereo, 29049 Tuxtla Gutiérrez, CHP, Mexico"
18.559602,-89.945345,"Balamkú (Maya)","2023-12-23T20:39:05Z","Zona arqueológica de Balamkú, Carretera Francisco Escárcega-Chetumal, 24653 Nuevo Conhuás, CAM, Mexico"
18.680511,-88.387077,"very good breakfast","2023-12-24T14:29:19Z","Los Ba
@jpmens
jpmens / wemos_mhz14.ino
Created April 8, 2016 10:26 — forked from bembu/wemos_mhz14.ino
Wemos D1 Mini + MH-Z14 + SoftwareSerial
#include <SoftwareSerial.h>
#include <ESP8266WiFi.h>
#include <ESP8266mDNS.h>
#include <ArduinoOTA.h>
#include <SoftwareSerial.h>
#include <Ticker.h>
const char* ssid = "Bembun";
const char* password = "ananasakaama";
#!/bin/sh
# Copyright 2023 Codeberg e.V.
# This work is marked with CC0 1.0 Universal. To view a copy of this
# license, visit http://creativecommons.org/publicdomain/zero/1.0
# This work is dedicated to the public domains under the terms of the
# Unlicense, visit https://unlicense.org/
# You are free to choose either the CC0 1.0 Univesal or Unlicense for this
# work.
@jpmens
jpmens / dig.py
Last active November 17, 2023 21:05
dig: a DNS lookup-plugin for Ansible
# (c) 2015, Jan-Piet Mens <jpmens(at)gmail.com>
#
# This file is part of Ansible
#
# Ansible 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.
#
# Ansible is distributed in the hope that it will be useful,