Skip to content

Instantly share code, notes, and snippets.

Avatar
😀

Mebus Mebus

😀
View GitHub Profile
@Mebus
Mebus / msys2.md
Created Nov 3, 2021 — forked from Bluexin/msys2.md
Setting up qtcreator with msys2 on windub
View msys2.md
@Mebus
Mebus / convert-matlab-scribts-to-utf8.sh
Last active May 6, 2019
Convert Matlab scripts from ISO-8859-1 to UTF-8
View convert-matlab-scribts-to-utf8.sh
#!/bin/bash
# This script converts Matlab scripts from ISO-8859-1 to utf-8 (a modern standard)
# requirements: bash, iconv
#
# @author Mebus, https://mebus.github.io
#
for f in $(find . -iname "*.m" -exec file -i {} \; | grep "iso-8859-1" | grep -Eo '^.*\.m')
do
@Mebus
Mebus / vfilter.py
Created Apr 24, 2019
Simple filter script for *.ics files
View vfilter.py
#!/usr/bin/python3
# -*- coding: utf-8 -*-
# This is a simple Python script, which allows you to filter events in a *.ics
# by a string in the summary.
#
# Use the Unix pipe > to write the output to a file.
#
# MIT License
View boot.ipxe
#!ipxe
# Source: https://gist.github.com/robinsmidsrod/2234639#file-menu-ipxe
# Some menu defaults
#set menu-timeout 5000
set menu-timeout 0
set submenu-timeout ${menu-timeout}
isset ${menu-default} || set menu-default exit
@Mebus
Mebus / Anaconda from Powershell.md
Last active Dec 14, 2018 — forked from eliasah/Anaconda from Powershell.md
Running Anaconda 4 from Powershell on Windows 10
View Anaconda from Powershell.md

To correctly work with Anaconda on Powershell :

  • Run the anaconda command :
C:\Users\elias\Anaconda3> cmd C:\Users\elias\Anaconda3\envs\py35\Scripts\activate.bat C:\Users\elias\Anaconda3\envs\py35\Scripts\activate.bat
Microsoft Windows [Version 10.0.14393]
(c) 2016 Microsoft Corporation. All rights reserved.
  • List the available environments:
View gist:fc1739452d22ccafb95470494a0f9c5b
/*
* drivedb.h - smartmontools drive database file
*
* Home page of code is: http://smartmontools.sourceforge.net
*
* Copyright (C) 2003-11 Philip Williams, Bruce Allen
* Copyright (C) 2008-13 Christian Franke <smartmontools-support@lists.sourceforge.net>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
View russascii.py
alphabet = "абвгдеёжзийклмнопрстуфхцчшщъыьэюя"
print(len(alphabet))
aufgaben = [
[31, 12, 16, 15, 16, 14, 10, 19, 20],
[19, 6, 12, 18, 6, 20, 1, 18, 30],
[1, 5, 3, 16, 12, 1, 20],
[10, 15, 8, 6, 15, 6, 18],
[5, 16, 24, 6, 15, 20],
[8, 21, 18, 15, 1, 13, 10, 19, 20],
@Mebus
Mebus / zuendreihenfolge.py
Last active Aug 5, 2018
Python3 Skript zur Berechnung des Kurbelsterns aus einer Zündreihenfolge
View zuendreihenfolge.py
#!/usr/bin/python3
from prettytable import PrettyTable # pip3 install prettytable
## Modulofunktion
def modulo(zahl):
erg = zahl % 360
return erg + 360 if erg < 0 else erg
# Ausgabe der Berechnung
View simple-https-server.py
# taken from http://www.piware.de/2011/01/creating-an-https-server-in-python/
# generate server.xml with the following command:
# openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes
# run as follows:
# python simple-https-server.py
# then in your browser, visit:
# https://localhost:4443
import BaseHTTPServer, SimpleHTTPServer
import ssl
View Melbus_Mitsubishi HU.ino
/* Melbus CDCHGR Emulator
* Program that emulates the MELBUS communication from a CD-changer (CD-CHGR) in a Volvo V70 (HU-xxxx) to enable AUX-input through the 8-pin DIN-contact.
* This setup is using an Arduino Nano 5v clone
*
* The HU enables the CD-CHGR in its source-menue after a successful initialization procedure is accomplished.
* The HU will remove the CD-CHGR everytime the car starts if it wont get an response from CD-CHGR (second init-procedure).
*
* Karl Hagström 2015-11-04
* mod by S. Zeller 2016-03-14
*