Skip to content

Instantly share code, notes, and snippets.

View Mebus's full-sized avatar
😀

Mebus Mebus

😀
View GitHub Profile
@Mebus
Mebus / sshclient.go
Created May 11, 2017 17:07 — forked from josephspurrier/sshclient.go
Golang SSH Client
package main
import (
"bufio"
"io/ioutil"
"os/signal"
//"syscall"
"fmt"
"log"
"os"
@Mebus
Mebus / mount_qcow2.md
Created December 26, 2022 10:36 — forked from shamil/mount_qcow2.md
How to mount a qcow2 disk image

How to mount a qcow2 disk image

This is a quick guide to mounting a qcow2 disk images on your host server. This is useful to reset passwords, edit files, or recover something without the virtual machine running.

Step 1 - Enable NBD on the Host

modprobe nbd max_part=8
@Mebus
Mebus / msys2.md
Created November 3, 2021 15:59 — forked from Bluexin/msys2.md
Setting up qtcreator with msys2 on windub
@Mebus
Mebus / convert-matlab-scribts-to-utf8.sh
Last active May 6, 2019 15:54
Convert Matlab scripts from ISO-8859-1 to UTF-8
#!/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 April 24, 2019 09:57
Simple filter script for *.ics files
#!/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
@Mebus
Mebus / boot.ipxe
Created March 21, 2019 09:23 — forked from mulbc/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 December 14, 2018 08:47 — forked from eliasah/Anaconda from Powershell.md
Running Anaconda 4 from Powershell on Windows 10

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:
/*
* 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
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 August 5, 2018 08:30
Python3 Skript zur Berechnung des Kurbelsterns aus einer Zündreihenfolge
#!/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