Skip to content

Instantly share code, notes, and snippets.

View loulecrivain's full-sized avatar

Lou Lecrivain loulecrivain

  • WDZ GmbH
  • Rennes, France
View GitHub Profile
@has2k1
has2k1 / metaprogramming.ipynb
Last active February 6, 2025 15:18
Automatic registration for single dispatch
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tdussa
tdussa / failover.md
Last active March 30, 2025 17:25
MikroTik failover routing description (living document)

MikroTik Routing Failover

This is meant to be a somewhat-easier-to-digest recap of the discussion that can be found on the MikroTik forum at this URL: https://forum.mikrotik.com/viewtopic.php?f=23&t=157048&p=836497&hilit=failover#p836497 Note that the forum discussion not only addresses failover, but also load balancing at the same time (without explicitly saying so in the beginning).

For the sake of this document, we'll make some assumptions:

@XioNoX
XioNoX / autorsi.py
Last active October 18, 2024 16:14
Generate then download Juniper RSI and logs. Optionally uploads them to the matching JTAC case.
#!/usr/bin/env python3
# usage: autorsi.py [-h] [--username USERNAME] [--sshconf SSHCONF] [--case CASE]
# hostname
#
# Generate then download RSI and logs. Optionally upload them to the matching
# JTAC case.
#
# positional arguments:
# hostname Device to connect to
#
@geerlingguy
geerlingguy / ansible-role-test.sh
Last active December 14, 2024 17:13
Ansible Role Test Shim Script
#!/bin/bash
#
# Ansible role test shim.
#
# Usage: [OPTIONS] ./tests/test.sh
# - distro: a supported Docker distro version (default = "centos7")
# - playbook: a playbook in the tests directory (default = "test.yml")
# - role_dir: the directory where the role exists (default = $PWD)
# - cleanup: whether to remove the Docker container (default = true)
# - container_id: the --name to set for the container (default = timestamp)
@lateau
lateau / dont-kill-emacs.el
Created March 28, 2013 04:27
Disable C-x C-c binding execute kill-emacs.
(defun dont-kill-emacs()
"Disable C-x C-c binding execute kill-emacs."
(interactive)
(error (substitute-command-keys "To exit emacs: \\[kill-emacs]")))
(global-set-key (kbd "C-x C-c") 'dont-kill-emacs)
@CristinaSolana
CristinaSolana / gist:1885435
Created February 22, 2012 14:56
Keeping a fork up to date

1. Clone your fork:

git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream