Skip to content

Instantly share code, notes, and snippets.

🦊
.

azlux

🦊
.
Block or report user

Report or block azlux

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@azlux
azlux / markdown_doc
Last active Sep 7, 2018 — forked from jiffyclub/markdown_doc
This script turns Markdown into HTML using the Python markdown library and wraps the result in a complete HTML document with default Bootstrap styling so that it's immediately printable. Requires the python libraries jinja2, markdown, and mdx_smartypants.
View markdown_doc
!/usr/bin/env python3
import argparse
import sys
import jinja2
import markdown
import re
TEMPLATE = """<!DOCTYPE html>
@azlux
azlux / proxmox.json
Last active Aug 5, 2018
Grafana Proxmox Containers Dashboard, screenshot : https://imgur.com/a/p2RVFXf
View proxmox.json
{
"__inputs": [
{
"name": "DS_OTHERS",
"label": "others",
"description": "",
"type": "datasource",
"pluginId": "influxdb",
"pluginName": "InfluxDB"
},
@azlux
azlux / dns_update.sh
Created May 29, 2017
Update script for my dnsmasq to remove add
View dns_update.sh
#!/bin/bash
# Address to send ads to (the RPi)
piholeIP="127.0.0.1"
# Config file to hold URL rules
eventHorizion="/etc/dnsmasq.d/adList.conf"
echo "Getting yoyo ad list..."
curl -s -d mimetype=plaintext -d hostformat=unixhosts http://pgl.yoyo.org/adservers/serverlist.php? | sort > /tmp/matter.txt
@azlux
azlux / mumble-ping.py
Created Jan 6, 2017
Mumble ping to have users, ping and bandwidth of a server
View mumble-ping.py
import socket
from struct import pack, unpack
import datetime
###
# Work based on https://bitbucket.org/Svedrin/k10-plugins/src/tip/BwCalc/plugin.py?fileviewer=file-view-default#cl-120
###
def mumble_ping(host, port=64738):
@azlux
azlux / spinner.txt
Last active Jan 18, 2018
spinner list for program
View spinner.txt
dots = ("⠋","⠙","⠹","⠸","⠼","⠴","⠦","⠧","⠇","⠏")
dots2 = ("⣾","⣽","⣻","⢿","⡿","⣟","⣯","⣷")
dots3 = ("⠋","⠙","⠚","⠞","⠖","⠦","⠴","⠲","⠳","⠓")
dots4 = ("⠄","⠆","⠇","⠋","⠙","⠸","⠰","⠠","⠰","⠸","⠙","⠋","⠇","⠆")
dots5 = ("⠋","⠙","⠚","⠒","⠂","⠂","⠒","⠲","⠴","⠦","⠖","⠒","⠐","⠐","⠒","⠓","⠋")
dots6 = ("⠁","⠉","⠙","⠚","⠒","⠂","⠂","⠒","⠲","⠴","⠤","⠄","⠄","⠤","⠴","⠲","⠒","⠂","⠂","⠒","⠚","⠙","⠉","⠁")
dots7 = ("⠈","⠉","⠋","⠓","⠒","⠐","⠐","⠒","⠖","⠦","⠤","⠠","⠠","⠤","⠦","⠖","⠒","⠐","⠐","⠒","⠓","⠋","⠉","⠈")
dots8 = "⠁","⠁","⠉","⠙","⠚","⠒","⠂","⠂","⠒","⠲","⠴","⠤","⠄","⠄","⠤","⠠","⠠","⠤","⠦","⠖","⠒","⠐","⠐","⠒","⠓","⠋","⠉","⠈","⠈")
dots9 = ("⢹","⢺","⢼","⣸","⣇","⡧","⡗","⡏")
dots10 = ("⢄","⢂","⢁","⡁","⡈","⡐","⡠")
@azlux
azlux / Warning_IPTABLES.md
Last active Jul 25, 2019
Sécurité avec iptables et l'option RELATED
View Warning_IPTABLES.md

Problème d'ouvertue de port non désirée sur une configuration IPTABLES

Un problème de contournement des règles iptables fixées par utilisateur peut survenir avec l’utilisation de règles iptables RELATED,ESTABLISH trop générique et le chargement de helper de service non présent ou non utilisé sur la machine (exemple FTP actif, SIP, IRC …).

True fact: Mon server MariaDB s'est fait attaqué comme ça alors que le port dans l'iptable n'était pas ouvert.


Menu

  1. Rappel
@azlux
azlux / py_progress_bar.py
Created Jun 20, 2016
Progress bar into the terminal in python3
View py_progress_bar.py
def progress_bar(iteration, total, barLength=50):
percent = int(round((iteration / total) * 100))
nb_bar_fill = int(round((barLength * percent) / 100))
bar_fill = '#' * nb_bar_fill
bar_empty = ' ' * (barLength - nb_bar_fill)
sys.stdout.write("\r [{0}] {1}%".format(str(bar_fill + bar_empty), percent))
sys.stdout.flush()
def bar_example():
for i in range(20):
You can’t perform that action at this time.