Skip to content

Instantly share code, notes, and snippets.

View psuet's full-sized avatar

Paul Sütterlin psuet

View GitHub Profile
@bwiklak
bwiklak / rle.cpp
Created April 6, 2012 21:19
RLE encoding in C++
template< typename C >
string rle( const C& input )
{
stringstream out;
typedef C::const_iterator::value_type el_tyle;
pair<C::const_iterator,C::const_iterator> bounds;
bounds.second=input.begin();
while( (bounds.first=bounds.second)!=input.end() )
{
@SanderTheDragon
SanderTheDragon / postman-deb.sh
Last active July 7, 2024 12:44
A shellscript to create a Postman .deb file, for simple installation on Debian-based Linux distro's. Also creates a .desktop file.
#!/bin/sh
# SPDX-FileCopyrightText: 2017-2024 SanderTheDragon <sanderthedragon@zoho.com>
#
# SPDX-License-Identifier: MIT
arch=$(dpkg --print-architecture)
echo "Detected architecture: $arch"
case "$arch" in
@ixs
ixs / intel_x520_patcher.py
Last active July 2, 2024 18:01
Intel x520 EEPROM Patcher allows to unlock the x520 network card to work with non-intel branded SFP modules.
#!/usr/bin/env python3
#
# Simple Intel x520 EEPROM patcher
# Modifies the EEPROM to unlock the card for non-intel branded SFP modules.
#
# Copyright 2020,2021,2022 Andreas Thienemann <andreas@bawue.net>
#
# Licensed under the GPLv3
#
# Based on research described at https://forums.servethehome.com/index.php?threads/patching-intel-x520-eeprom-to-unlock-all-sfp-transceivers.24634/