Skip to content

Instantly share code, notes, and snippets.

View MightyPork's full-sized avatar
🐶
meow

Ondřej Hruška MightyPork

🐶
meow
View GitHub Profile
# == ESPTerm config export ==
# Device: 03263E - Fancy Title
# Version: 2.2.0
[system]
uart_baudrate = 115200
uart_parity = 2
uart_stopbits = 1
config_version = 1
pwlock = 0
@MightyPork
MightyPork / doodlepad.diff
Last active October 14, 2017 20:57
glitch-soc DoodlePad diff against tootsuite/master, generated Oct 14, 2017
diff --git a/app/javascript/mastodon/actions/compose.js b/app/javascript/mastodon/actions/compose.js
index 8a35049b..5e39bd8c 100644
--- a/app/javascript/mastodon/actions/compose.js
+++ b/app/javascript/mastodon/actions/compose.js
@@ -44,6 +44,8 @@ export const COMPOSE_UPLOAD_CHANGE_REQUEST = 'COMPOSE_UPLOAD_UPDATE_REQUEST'
export const COMPOSE_UPLOAD_CHANGE_SUCCESS = 'COMPOSE_UPLOAD_UPDATE_SUCCESS';
export const COMPOSE_UPLOAD_CHANGE_FAIL = 'COMPOSE_UPLOAD_UPDATE_FAIL';
+export const COMPOSE_DOODLE_SET = 'COMPOSE_DOODLE_SET';
+

STRUCTS

enum ScreenSerializeTopic {
  TOPIC_CHANGE_SCREEN_OPTS  = (1<<0),
  TOPIC_CHANGE_CONTENT_ALL  = (1<<1),
  TOPIC_CHANGE_CONTENT_PART = (1<<2),
  TOPIC_CHANGE_TITLE        = (1<<3),
  TOPIC_CHANGE_BUTTONS      = (1<<4),
@MightyPork
MightyPork / RealProductPhotos.js
Last active September 23, 2017 09:02
Deobfuscated Real Product Photos (ldiogmccojapkeckgbfjkmjdbhgopghb) aliexpress extension code
setGetRealImagesButton();
function setGetRealImagesButton() {
var btn = addGetRealImgButtonOnPage();
btn.addEventListener('click', getRealImgBtnPressed, true)
}
function addGetRealImgButtonOnPage() {
var productActionMain = document.getElementsByClassName('product-action-main')[0];
var a = document.createElement('a');
<?php
/**
* Get time in seconds from user entered interval
*
* @param $time
* @return int seconds
*/
function strToSeconds($time)
@MightyPork
MightyPork / mastodon-sepia-theme.css
Created September 16, 2017 15:42
mastodon-sepia-theme.css
html {
filter: invert();
}
.notification__favourite-icon-wrapper,
img, video, .image-loader__preview-canvas,
.account__avatar, .account__avatar-overlay-base,
.account__avatar-overlay-overlay, .compose-form {
filter: invert();
}
body {
font-size:13px;
font-family:"MS Sans Serif", sans-serif;
color:black;
font-family: Consolas;
}
.ui .columns-area {
background: #007878;
}
@MightyPork
MightyPork / unicode_cache.c
Created September 11, 2017 00:00
unicode cache for espterm
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <stdint.h>
#include <stdbool.h>
#include <string.h>
@MightyPork
MightyPork / utf8_encode.c
Last active February 28, 2024 08:07
C function to encode a Unicode code point as UTF-8 byte array
#include <stdint.h>
/**
* Encode a code point using UTF-8
*
* @author Ondřej Hruška <ondra@ondrovo.com>
* @license MIT
*
* @param out - output buffer (min 5 characters), will be 0-terminated
* @param utf - code point 0-0x10FFFF
@MightyPork
MightyPork / ansi_rgb.js
Last active October 4, 2023 08:55
Convert ANSI color 0-255 to RGB
const low_rgb = [
'#000000', '#800000', '#008000', '#808000', '#000080', '#800080', '#008080', '#c0c0c0',
'#808080', '#ff0000', '#00ff00', '#ffff00', '#0000ff', '#ff00ff', '#00ffff', '#ffffff'
]
function ansi_rgb(ansi) {
if (ansi < 0 || ansi > 255) return '#000'
if (ansi < 16) return low_rgb[ansi]
if (ansi > 231) {