Skip to content

Instantly share code, notes, and snippets.

View dotmpe's full-sized avatar

.mpe dotmpe

  • NL
  • 08:20 (UTC +02:00)
View GitHub Profile
@dotmpe
dotmpe / tampermonkey-nuke-yt-player.js
Created December 21, 2023 01:31
Nuke YT player to prevent it from playing
// To run, install GreaseMonkey or TamperMonkey extension in your browser
// Copy this code into new user script, and enable
// ==UserScript==
// @name Nuke Youtube player
// @version 0.1
// @description Prevent from playing videos, initial version
// @author .mpe
// @match *://www.youtube.com/*
// @run-at document-load
@dotmpe
dotmpe / my_action_plugin.py
Last active February 12, 2023 21:34 — forked from ju2wheels/my_action_plugin.py
Ansible 2.4 Action Plugin Template
# For a high level over see video at https://www.ansible.com/blog/how-to-extend-ansible-through-plugins
# Standard base includes and define this as a metaclass of type
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
# Important contants
from ansible import constants as C
# Common error handlers
from ansible.errors import AnsibleError
@dotmpe
dotmpe / default.do
Last active November 18, 2022 00:29
Redo-Map-Reduce....
#!/usr/bin/env bash
# While writing a rule system to add a few declarative parts around Redo, I realized that Redo targets can be anything
# you want (safe for some considerations wrt. paths/file names).
# So might it be possible to built a completely functional system?
# Processing that idea this evening I found a library with some basic functional routines for Bash,
# and I toyed a bit with what is possible using expressions as target names.
# Aside from the expected escape/quotation issues, Redo has no complaints really.
@dotmpe
dotmpe / README.rst
Last active July 9, 2022 14:39
More useful history in Bash
import dbus
sysbus = dbus.SystemBus()
systemd = sysbus.get_object(
'org.freedesktop.systemd1',
'/org/freedesktop/systemd1'
)
manager = dbus.Interface(
systemd,
@dotmpe
dotmpe / glances.sh
Created August 11, 2018 18:45
How-to run glances webserver and client docker
#1/bin/sh
set -e
test -n "$vol_dir" || vol_dir=/srv/docker-volumes-local
test -n "$conf" || conf=$vol_dir/glances/conf-glances.conf
test -n "$ver" || ver=latest
test -n "$ver" || ver=stable
test -n "$ver" || ver=v2.11.1
test -n "$hostname" || hostname="$(hostname -s)"
test -n "$domainname" || domainname=example.net
#!/bin/sh
set -e
# How to find duplicate files, paths pointing at the same content, using GIT
# To get at the basic information, use ls-tree
git ls-tree -r HEAD
# Annex can be made to do something similar for its backend
#!/usr/bin/make
default:
.PHONY: default install
BASH := $(shell which bash)
export BASH_ENV=env.sh
$(info 0 foo=$(foo) $(shell echo foo=$$foo))
@dotmpe
dotmpe / Makefile
Last active September 29, 2017 23:56
default: test
demo:
@./_vc-conflicts.sh diff-file conflict-test.txt
@./_vc-conflicts.sh stat-file conflict-test.txt
@./_vc-conflicts.sh count-file conflict-test.txt
test:
bats vc-conflicts-spec.bats
{
"name": "mautic/core",
"license": "GPL-3.0",
"type": "project",
"description": "Mautic Open Source Distribution",
"autoload": {
"psr-4": {
"Mautic\\": "app/bundles/",
"MauticPlugin\\": "plugins/",
"Mautic\\Middleware\\": "app/middlewares/"