Instantly share code, notes, and snippets.

View 3D Filaments Switzerland.md
View siv_animation_of_poles.m
%******************************************************************************
% \details : Animation to display the poles of a transfer function in
% dependence of the parameter qp
% \autor : Simon Burkhardt
% \file : siv_animation_of_poles.m
% \date : 23.11.2018
% \version : 1.0
%******************************************************************************
clear all; close all; clc;
format shorteng;
View four_wheeled_car_trial_tinkering.m
%******************************************************************************
% \details : An3E Serie 1
% \autor : Simon Burkhardt
% \file : four_wheeled_car_trial_tinkering.m
% \date : 19.11.2018
% \version : 1.0
%******************************************************************************
clear all; close all; clc; format shorteng;
% input variables
View Arduino_hex_to_int.cpp
uint32_t htoi( String htoi_str ){
char itoh_lower[18] = {"0123456789abcdef"}; // 16 chars + null
char itoh_upper[18] = {"0123456789ABCDEF"}; // 16 chars + null
uint32_t htoi_number = 0;
for(int index = 0; index < htoi_str.length(); index ++){ // each hex number in String
for(int val = 0; val < 16; val ++){ // each possible value
if ( htoi_str[htoi_str.length() -index -1] == itoh_lower[val] ||
htoi_str[htoi_str.length() -index -1] == itoh_upper[val] ){
if(val > 0){
View file2json.php
<?php
header('Content-type: application/json');
$filename = $_GET['f'];
$json_path = './resources/' . $filename;
if (file_exists($json_path) && strcmp(pathinfo($filename, PATHINFO_EXTENSION), 'json') ==0 ) {
$myfile = fopen($json_path, 'r') or die('Unable to open file!');
View template.py
#!/usr/bin/python
#_*_ coding: utf-8 _*_
'''
@file
@author
@date
'''
# ===== COLORS =====
View random-question.sh
#!/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?',
View RGBWDriver.ino
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;
View dynip-alert.py
#!/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