Skip to content

Instantly share code, notes, and snippets.

View mdeweerd's full-sized avatar

MDW mdeweerd

  • France
View GitHub Profile
@tushroy
tushroy / proxmox-realtek-r8168.md
Last active April 2, 2025 19:09
Realtek r8168 Driver for Proxmox VE Kernel version 6.8

Realtek r8168 Driver for Proxmox VE Kernel version 6.8

Blacklist r8169 kernel driver for being loaded

echo blacklist r8169 >> /etc/modprobe.d/blacklist-r8169.conf

Once all of this is completed we are going to update our GRUB to have some specific kernel parameters for our realtek driver

@mdeweerd
mdeweerd / Multipcap.pl
Last active April 20, 2021 00:47
wireshark / pcap tools
#!/usr/bin/env perl
# multipcap.pl
# License MIT + Any article (blog, site, documentation, etc)
# should link back to this page.
# Link : https://gist.github.com/mdeweerd/4bf3375b2ec56b5492a7a4695e19e92e
use strict;
#use File::PCAP::Reader; # Needed to read the pcap file
#use File::PCAP::Writer; # Needed to write the pcap file
@mdeweerd
mdeweerd / logToPcap.pl
Last active May 27, 2021 22:14
Perl script to convert a regular log file as syslog messages in a pcap file for wireshark
#!/bin/perl
# SCRIPT TO CONVERT TEXT LOG TO PCAP FILE
# READS DATES FROM LOG FILE
# WHEN READING FROM PIPE (UNTESTED) WITHOUT DATES,
# THE CURRENT TIMESTAMP IS USED.
#
# Potential parameters to the script:
# Parameter ending in ".log" is the log input file
# Parameter ending in ".pcap" is the log output file
# Digit from 0 to 7 is the log index.
@Salamandar
Salamandar / kicad_generate_gerber.py
Last active October 18, 2020 20:30
Python script that generates Gerber, Drill map, Position file, and zips everything.
#!/usr/bin/env python3
# ----------------------------------------------------------------------------
# "THE BEER-WARE LICENSE" (Revision 42):
# Salamandar <[email protected]> wrote this file. As long as you retain this notice you
# can do whatever you want with this stuff. If we meet some day, and you think
# this stuff is worth it, you can buy me a beer in return. Félix Piédallu
# ----------------------------------------------------------------------------
import sys
@ktcy
ktcy / silence.js
Created October 24, 2018 10:20
Create WAV file containing only silence
function createSilence(seconds = 1) {
const sampleRate = 8000;
const numChannels = 1;
const bitsPerSample = 8;
const blockAlign = numChannels * bitsPerSample / 8;
const byteRate = sampleRate * blockAlign;
const dataSize = Math.ceil(seconds * sampleRate) * blockAlign;
const chunkSize = 36 + dataSize;
const byteLength = 8 + chunkSize;