Skip to content

Instantly share code, notes, and snippets.

View LeoVerto's full-sized avatar

Leo Verto LeoVerto

View GitHub Profile
@LeoVerto
LeoVerto / signal-rest.yaml
Created October 4, 2022 18:21
CrowdSec alert to signal-cli-rest-api
type: http
name: signal-rest
log_level: info
group_wait: 30s
format: |
{
"number": "SENDER_NUMMER",
const ICON = {
jellyfin: "M12 1.09375 C 9.113281 1.09375 -0.179688 17.941406 1.238281 20.785156 C 2.65625 23.632812 21.363281 23.597656 22.765625 20.785156 C 24.167969 17.972656 14.886719 1.09375 12 1.09375 Z M 19.05>"
};
async function getIcon(name) {
return {
path: ICON[name],
viewBox: "0 0 24 24"
};
};
@LeoVerto
LeoVerto / jellyfin-icons.html
Last active August 3, 2019 20:04
Jellyfin icons for Home Assistant
<ha-iconset-svg name="jlf" size="24"><svg><defs>
<g id="jellyfin">
<path id="inner-shape" d="M12.0012713844 9.45471264461C11.0464630524 9.45471264461 7.96673813844 15.0384692136 8.43478143844 15.9792362466C8.90282473844 16.92000342 15.1043984634 16.910642554 15.5677613304 15.9792362466C16.0311241974 15.0478300796 12.9607601494 9.45471264461 12.0012713844 9.45471264461C12.0012713844 9.45471264461 12.0012713844 9.45471264461 12.0012713844 9.45471264461"/>
<path id="outer-shape" d="M12.0012713844 1.10950074602C9.11812465644 1.10950074602 -0.158493409151 17.930976948 1.25499735685 20.771999779C2.66848812285 23.61302261 21.3480960854 23.580259579 22.7475455524 20.771999779C24.1469950194 17.963739979 14.8844181124 1.10950074602 12.0012713844 1.10950074602C12.0012713844 1.10950074602 12.0012713844 1.10950074602 12.0012713844 1.10950074602M19.0453230494 18.310092021C18.1279581814 20.14950219 5.88862588644 20.172904355 4.96190015244 18.310092021C4.03517441844 16.447279687 10.1150568854 5.42485997202 12.0012713844
DOMAIN = 'z_wave_graph'
REQUIREMENTS = ['networkx']
def setup(hass, config):
return True
@LeoVerto
LeoVerto / report.md
Last active August 14, 2018 15:44
SpamBrainz GSoC report

GSoC 2018: SpamBrainz – Fighting spam in MusicBrainz using machine learning

Hi, I'm Leo and I spent my summer building and training SpamBrainz, our new solution to fighting spam in MusicBrainz. If you haven't heard of SpamBrainz before it's probably because it did not exist before this year's Summer of Code.

For quite a while now the amount of spam in MusicBrainz has started to become a serious problem. Often this means editors are automatically created with descriptions that look not unlike the spam emails most of us get every day, promoting other websites and

A small example:

<a> !startvote <name> # Opens for voting
<b> +1
<c> +1
<d> -1 <concern?>
<any_user> !countvote
<BrainzBot> [2 for: b, c] [1 against: d] [Noone abstained]
<e> \1
<a> !endvote

Creating a complete botbot development environment using Docker containers

Botbot is a strange piece of software, it consists of three different repositories and uses at least three different programming languages (namely Python, Go and JS).

For basic plugin development using botbot-shell if often sufficient but as soon as you want to do some manual integration testing or work on botbot-web you're going to need a full dev environment.

The goal of this guide is to walk you through setting up a complete botbot setup that I would not exactly recommend for production but should be fine for development and testing.

Disclaimer: This guide assumes you won't want to work on botbot-bot as we haven't forked that yet but go should allow for installing packages from local sources the same way pip does.

Keybase proof

I hereby claim:

  • I am leoverto on github.
  • I am leo_verto (https://keybase.io/leo_verto) on keybase.
  • I have a public key ASBb9O1ioRO99_5CNOSDXZ_O-MvW3A_nqGIckFS10nHKFwo

To claim this, I am signing this object:

@LeoVerto
LeoVerto / pseudocode.md
Last active May 7, 2016 15:10
MetaBrainz meeting botbot plugin pseudocode

MB meeting botbot plugin

Config options:

  • [meeting start time] (UTC) = "19:00"
  • [meeting end time] (UTC) = "20:00"
  • [meeting start msg] = "<BANG>"
  • [meeting end msg] = "</BANG>"
  • [meeting managers] = "Freso;ruaok"
  • [report time] = 180
  • [report warn time] = 60
@LeoVerto
LeoVerto / reddit-robin-remember-turley.user.js
Last active April 1, 2016 19:42
Slightly modified userscript with built-in REMEMBER TURLEY
// ==UserScript==
// @name Robin Auto-Growth & Remember Turley
// @namespace com.github.leoverto
// @include https://www.reddit.com/robin/
// @version 1
// @grant none
// ==/UserScript==
setTimeout(function () {
document.getElementsByClassName("robin--vote-class--increase")[0].click();
document.getElementsByClassName("text-counter-input")[0].value = "REMEMBER TURLEY!";