My personal cheatsheet for using the Linux command line.
Linux Subsystem
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; |
/* USER CODE BEGIN Includes */ | |
#include <stdio.h> | |
/* USER CODE BEGIN 0 */ |
#!/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 |
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; |
#!/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?', |
#!/usr/bin/python | |
#_*_ coding: utf-8 _*_ | |
''' | |
@file | |
@author | |
@date | |
''' | |
# ===== COLORS ===== |
<?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!'); |
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){ |