Skip to content

Instantly share code, notes, and snippets.

View pepitooo's full-sized avatar

Michel C. pepitooo

View GitHub Profile
@pepitooo
pepitooo / fix-eth-hang.md
Created May 16, 2021 13:15 — forked from brunneis/fix-eth-hang.md
Proxmox | Fix "e1000e Detected Hardware Unit Hang"
Proxmox Virtual Environment 6.1-3 / Debian 10 (buster)
Kernel 5.3.10-1-pve
Ethernet controller: Intel Corporation Ethernet Connection (2) I218-V (rev 05)
Ethernet driver: e1000e 3.2.6-k
Ethernet firmware: 0.1-4

The solution I've found was to create a oneshot service which disables segmentation offloading.

@pepitooo
pepitooo / sensors2hass.py
Created May 4, 2021 10:02
Post lm-sensor to HASS
#!/usr/bin/env python3
import argparse
import subprocess
import json
import sys
from urllib import parse
from requests import post
@pepitooo
pepitooo / README.md
Last active November 1, 2022 20:29
Ping widget for smashing (dashing)

preview

preview

description

Simple widget to ping a host and get color feedback, green => online red => offline

@pepitooo
pepitooo / debouncer.hpp
Created November 14, 2019 11:54
Arduino input debouncer
#include <Arduino.h>
/**
* #include "debouncer.hpp"
*
* const int pushPin = D2;
* debounce_t push_debounce;
*
* void setup() {
* pinMode(LED_BUILTIN, OUTPUT);
# Based on tjkirch.zsh-theme to ajust to color I want and I like.
ZSH_THEME_GIT_PROMPT_PREFIX=" %{$fg[green]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg[red]%}\u21AF"
ZSH_THEME_GIT_PROMPT_CLEAN=" \u2714"
PROMPT='%{$fg_bold[green]%}%n%{$reset_color%}@%{$fg_bold[red]%}%M%{$reset_color%}:%{$fg_bold[blue]%}[$(pwd)]%{$reset_color%}
> ' # default prompt
#!/bin/python
# cat /dev/ttyACM3 | python /home/user/fix_gpsrollover.py | gpsd -n -N /dev/stdin
# where /dev/ttyACM3 is your gps serial output.
from datetime import datetime, timedelta
import sys
import os
from signal import signal, SIGPIPE, SIG_DFL
@pepitooo
pepitooo / hi_on_line_radios.pls
Created October 27, 2017 14:56
Hi on line radio
[playlist]
numberofentries=5
File1=http://mediaserv30.live-streams.nl:8086/stream
Title1=Hi On Line Pop Radio
File2=http://mediaserv38.live-streams.nl:8027/stream
Title2=Hi On Line World Radio
File3=http://mediaserv33.live-streams.nl:8034/stream
Title3=Hi On line Latin Radio
File4=http://mediaserv33.live-streams.nl:8036/stream
Title4=Hi On Line Lounge Radio
@pepitooo
pepitooo / IP_Configurator.bat
Created June 28, 2017 09:05
Script to configure network on Windows
@echo off
set IP_Ending=9
set Interface_Name="Ethernet"
echo Here are the new settings for %computername%:
netsh int ip show config %Interface_Name%
goto check_Permissions
:check_Permissions
@pepitooo
pepitooo / run_in_directories.py
Last active September 30, 2016 12:06
Run same command in all directories, usefull when you want to do a "git pull" $ python run_in_directories.py -f tirs* -c "git pull"
#! python
import argparse
import os
import sys
import logging
from subprocess import Popen, PIPE
def parse_args(args):
"""
Parse command line parameters
@pepitooo
pepitooo / .gitignore
Last active August 29, 2015 14:26 — forked from octocat/.gitignore
Some common .gitignore configurations
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
*.pyo
*.pyc