Status: Draft Date: 2026-05-28
Status: Draft
| #include <string.h> | |
| #include <libopencm3/stm32/rcc.h> | |
| #include "arm_sin_f32.h" | |
| #include "gpio.h" | |
| #include "i2s.h" | |
| #include "usb.h" | |
| static void setup_clocks(void) |
| #ifndef H_SDLSIMPLE | |
| #define H_SDLSIMPLE | |
| #include <SDL2/SDL.h> | |
| #include <stdbool.h> | |
| #include <stdio.h> | |
| // defines | |
| typedef struct sdlsimple_events_t { | |
| bool quit; |
| # wordle.tcl | |
| set inc_l s | |
| set excl_l judgemcbn | |
| set inc_pt [list '.la.k' ] | |
| set excl_pt [list 's....'] | |
| proc include-letters {letters} { | |
| set letters_list [split $letters {}] |
| import React from 'react' | |
| import { observer } from 'mobx-react' | |
| import store from './store' | |
| let student1 = { | |
| id: 'student1', | |
| name: 'Ben' | |
| } | |
| let student2 = { | |
| id: 'student2', |
| import { observable, computed } from 'mobx' | |
| const store = observable({ | |
| students: observable.map(), | |
| courses: observable.map(), | |
| enrollment: observable.map(), | |
| addStudent(student) { | |
| if (this.students.has(student.id)) { | |
| throw new Error('student already exists') |
| /********************************************** | |
| * | |
| * This simple library is used to redirect | |
| * functions like printf(), scanf(), putchar() | |
| * among other to the UART output on the STM32 | |
| * using HAL. | |
| * | |
| * Credits to the book Mastering STM32 | |
| * File by Benjamin Calderon 2017 | |
| * |
| let startArr = [1, 2, 3, 4, 5] | |
| let newArr = startArr.filter(n => n > 2) // -> [3, 4, 5] | |
| let newStr = "foo bar" | |
| let result = newStr.startsWith("foo") // -> true |
| sudo chown -R admin:www-data /var/www; | |
| sudo find /var/www -type f -exec chmod 664 {} \; | |
| sudo find /var/www -type d -exec chmod 775 {} \; | |
| sudo find /var/www -type d -exec chmod g+s {} \; |
| // Credits: https://github.com/hexagon5un/AVR-Programming/blob/master/AVR-Programming-Library/macros.h | |
| #define BV(bit) (1 << bit) | |
| #define set_bit(sfr, bit) (_SFR_BYTE(sfr) |= BV(bit)) // old sbi() | |
| #define clear_bit(sfr, bit) (_SFR_BYTE(sfr) &= ~BV(bit)) // old cbi() | |
| #define toggle_bit(sfr, bit) (_SFR_BYTE(sfr) ^= BV(bit)) |