Skip to content

Instantly share code, notes, and snippets.

View maciekmm's full-sized avatar
🎯
Focusing

Maciej Mionskowski maciekmm

🎯
Focusing
View GitHub Profile
static void lcd_start(void)
{
/* LCD Initialization */
BSP_LCD_Init();
/* LCD Initialization */
BSP_LCD_LayerDefaultInit(0, (unsigned int)lcd_image_bg);
BSP_LCD_LayerDefaultInit(1, (unsigned int)lcd_image_fg);
/* Enable the LCD */
BSP_LCD_SelectLayer(0);
srand(time(NULL));
for (int i = 0; i < 3; i++) {
BSP_LCD_SetTextColor((((uint32_t) rand()) & 0x00FFFFFF) + 0xFF000000);
int x1 = rand() % LCD_X_SIZE;
int x2 = rand() % LCD_X_SIZE;
int y1 = rand() % LCD_Y_SIZE;
int y2 = rand() % LCD_Y_SIZE;
int xl = min(x1, x2);
int xr = max(x1, x2);
@maciekmm
maciekmm / gist:5b6c0e3955c36f8efc752b5e5bc52ee5
Created April 12, 2019 20:30
/etc/X11/xinit/xinitrc.d/10-monitors.sh
#!/bin/sh
#TODO: fetch and calculate DPI from EDID data
internal=eDP1
internal_dpi=128
external=HDMI1
external_dpi=92
export SCALING_FACTOR=1
@maciekmm
maciekmm / README.md
Last active April 16, 2020 10:28
Tutorial #2 Grupa B 14:40
{
"file_spec": 1,
"file_creator": "A text editor",
"file_author": "Maciej Mionskowski",
"file_classes": ["animation", "origuide:guide"],
"frame_title": "",
"frame_classes": [
"creasePattern",
"origuide:steady_state"
],
package rere
import (
"errors"
"fmt"
"regexp/syntax"
"strings"
"golang.org/x/exp/rand"
)