Skip to content

Instantly share code, notes, and snippets.

View rossmacarthur's full-sized avatar
🦀

Ross MacArthur rossmacarthur

🦀
  • Cape Town, South Africa, Earth, Milky Way
  • 04:37 (UTC +02:00)
View GitHub Profile
@rkrzr
rkrzr / auto_tags.py
Last active April 10, 2024 11:14
Automatically generate ansible tags of the same name for each role in a playbook
"""
This module implements an Ansible plugin that is triggered at the start of a playbook.
The plugin dynamically generates a tag for each role. Each tag has the same name as its role.
The advantage of this is that it saves you some boilerplate, because you don't have to wrap
all tasks of a role in an additional block and assign a tag to that.
Additionally, it works automatically when you add new roles to your playbook.
Usage is exactly the same as without this plugin:
@ToadKing
ToadKing / pro.c
Created June 23, 2017 03:42
pro controller descriptors
// USB Device Descriptor
0x12, // bLength
0x01, // bDescriptorType (Device)
0x00, 0x02, // bcdUSB 2.00
0x00, // bDeviceClass (Use class information in the Interface Descriptors)
0x00, // bDeviceSubClass
0x00, // bDeviceProtocol
0x40, // bMaxPacketSize0 64
0x7E, 0x05, // idVendor 0x057E
@MoOx
MoOx / index.js
Last active February 9, 2024 22:44
Export/import github labels
// go on you labels pages
// eg https://github.com/cssnext/cssnext/labels
// paste this script in your console
// copy the output and now you can import it using https://github.com/popomore/github-labels !
var labels = [];
[].slice.call(document.querySelectorAll(".label-link"))
.forEach(function(element) {
labels.push({
name: element.textContent.trim(),
@flano-yuki
flano-yuki / similarly.md
Created November 2, 2014 12:41
similarly rfc