Skip to content

Instantly share code, notes, and snippets.

View mnemocron's full-sized avatar
:octocat:
bonk!

Simon Burkhardt mnemocron

:octocat:
bonk!
View GitHub Profile
@mnemocron
mnemocron / random-question.sh
Created June 24, 2018 08:13
dubblebubble.tumblr.com/post/137833419195/these-are-actually-hella-fucking-cute-yall
#!/bin/bash
python -c "import random
questions = ['1: when you have cereal, do you have more milk than cereal or more cereal than milk?',
'2: do you like the feeling of cold air on your cheeks on a wintery day?',
'3: what random objects do you use to bookmark your books?',
'4: how do you take your coffee/tea?',
'5: are you self-conscious of your smile?',
'6: do you keep plants?',
@mnemocron
mnemocron / RGBWDriver.ino
Created June 22, 2018 18:49
Inherited Class from Adafruit_PWMServoDriver
class RGBWDriver : public Adafruit_PWMServoDriver
{
private:
uint8_t ch_R;
uint8_t ch_G;
uint8_t ch_B;
uint8_t ch_W;
void setChannels(uint8_t r, uint8_t g, uint8_t b, uint8_t w)
{
this->ch_R = r;
@mnemocron
mnemocron / dynip-alert.py
Created June 21, 2018 12:01
Script that compares the first input argument (the domain) to the current external IP. If they do not match it attempts to send a Telegram message.
#!/usr/bin/python
# python 2.7
#_*_ coding: utf-8 _*_
"""
@file dynip-alert.py
@author Simon Burkhardt - simonmartin.ch
@date 2018-03-01
@version 1.1
@copyright CC0 - https://creativecommons.org/publicdomain/zero/1.0
@mnemocron
mnemocron / STM32HAL_printf_uart.c
Created May 17, 2018 13:48
Redirect printf() to UART on STM32 microcontroller
/* USER CODE BEGIN Includes */
#include <stdio.h>
/* USER CODE BEGIN 0 */
@mnemocron
mnemocron / Fensterfunktionen.java
Last active April 27, 2018 14:15
Fensterfunktionen für Signalverarbeitung
package pro2e.matlabfunctions;
import java.math.BigDecimal;
public class Fensterfunktionen {
/**
* @brief enumerations for the different window functions
*/
public static final int RECTANGULAR = 0;
public static final int CHEBYSHEV = 1;

CLI cheat sheet

My personal cheatsheet for using the Linux command line.


Windows

Linux Subsystem

@mnemocron
mnemocron / multiplexed-display.ino
Created February 1, 2018 08:47
Common Anode 7-Segment Display version of Ben Eater's eeprom-programmer
/**
* This sketch is specifically for programming the EEPROM used in the 8-bit
* decimal display decoder described in https://youtu.be/dLh1n2dErzE
*
* Adapted the truth table for common anode 7-segment display
*/
#define SHIFT_DATA 2
#define SHIFT_CLK 3
#define SHIFT_LATCH 4
#define EEPROM_D0 5
#!/bin/bash
# @title : debian-setup.sh
# @author : Simon Burkhardt - simonmartin.ch
# @date : 2017-12-23
# @version : 1.1.0
# @copyright : CC0 - https://creativecommons.org/publicdomain/zero/1.0
# @brief : Install beautiful stuff, uninstalls useless gnome bloatware
# @details : none
# @date : 10.04.2017
@mnemocron
mnemocron / random-berndeutsch.py
Created October 4, 2017 12:46
Selects a random word from the json word list (for a Telegram bot)
#!/usr/bin/python
#_*_ coding: utf-8 _*_
'''
@author Simon Burkhardt - simonmartin.ch - github.com/mnemocron
@date 2017
'''
import random
import sys # args