Skip to content

Instantly share code, notes, and snippets.

View maciekmm's full-sized avatar
🎯
Focusing

Maciej Mionskowski maciekmm

🎯
Focusing
View GitHub Profile
@maciekmm
maciekmm / pekaosa.js
Created August 2, 2024 12:49
A bookmarklet to input Pekao password from password manager
javascript: function c() {
const passwd = prompt();
Array.from(document.querySelectorAll(".masked-input-wrapper input:not([disabled])"))
.forEach(input => {
let index = Number(input.id.split("-").pop());
input.value = passwd[index];
let event = new Event('input', {
bubbles: true,
cancelable: true,
});
package rere
import (
"errors"
"fmt"
"regexp/syntax"
"strings"
"golang.org/x/exp/rand"
)
{
"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"
],
@maciekmm
maciekmm / README.md
Last active April 16, 2020 10:28
Tutorial #2 Grupa B 14:40
@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
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);
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 */
@maciekmm
maciekmm / purge_cache.php
Created June 7, 2017 07:09
Cloudflare cache purging script meant to be attached to github repo via a page_built webhook.
<?php
error_reporting(0);
define("CF_ZONE_ID", "");
define("CF_EMAIL", "");
define("CF_API_KEY", "");
define("GH_SECRET", "");
if($_SERVER['REQUEST_METHOD'] !== 'POST') {
error_log("Invalid request (expected POST)");
http_response_code(400);
// ==UserScript==
// @name Facebook Sidebar Defader
// @namespace https://mionskowski.pl/
// @version 0.1
// @description Increases readability of the chat sidebar
// @author Maciej Mionskowski
// @match https://*.facebook.com/*
// @grant GM_addStyle
// ==/UserScript==
@maciekmm
maciekmm / 73-wyniki.txt
Created March 8, 2017 14:47
Zbiór zadań: 73, 79
73.1 Słów z dwoma kolejnymi takimi samymi literami:
204
73.2 Statystyka:
A: 632 (7.55 %)
B: 196 (2.34 %)
C: 162 (1.94 %)
D: 422 (5.04 %)
E: 1093 (13.06 %)
F: 213 (2.55 %)