Skip to content

Instantly share code, notes, and snippets.

Avatar
🏳️‍🌈

Eliška F D3add3d

🏳️‍🌈
View GitHub Profile
View gist:ead137a7ec24baffdd007cd759728d6f
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDEGGDYKBCpY9D72ZZERDsDvn4M7WgFgmKZ5Ok3yel5LP4Wydj6vWosrmV9VPAPNALLMfS8tVYnxRVaXtObmiJDHf9zyVZeEbuoZ7Mknw7MkayzQ+HcGxapYJtamgZnMB93nLQab6Y76Wr19BS+r/lUA6ZtP6/MvIAwI4BkDT9ED1roD78dde8ojOSrbr4MpugrdzYH9r4PypG6qbE0qd4TFbMKq04itHHBlFeZRNHMpvu3c1XgDRDdPgRmjnhkTTKW+ZLK4+6L75IBwzgDjejfucSvRaoEAvoqYz1l0b7ZOxF7IIVMlerMsJaAP469vLzgwiWqjO4v6QzUDPP8XEI2sohF82NNcVJqlNY+TCk2bVEyrowNzvpDtQa24ukMPeGD2ylZ14hSkoJpVD3MeS6y904tlVMV01EubRmf7OIukW9Pk2wY8Va34WQCIWbYEdcqnFp20iM4XscELy6KbiWUzwFELxDoiHK9oPSJ4DnRPambW3dWMFMZbGifIgA4p9M= eli@eliskin-pinebook
View fit-ui-fix.userscript.js
// ==UserScript==
// @name FIT-UI-FIX
// @description A script to fix Progtest UI
// @include https://progtest.fit.cvut.cz/*
// @version 1
// @grant none
// @run-at document-idle
// ==/UserScript==
if(document.readyState == 'complete') {
@D3add3d
D3add3d / Theming.styl
Created Aug 18, 2020
How to achieve theming in Stylus -- the dumb but working way
View Theming.styl
//So imagine you want your application to be usable at night and/or under different light conditions.
//You obviously need to implement some kind of theme switching and while you could use the
//@media (prefers-color-scheme: dark/light) and call it a day the target OS and browser might not support
//this query, so it is better to also implement a theme switcher.
//To do this in Stylus should be as easy as using selector-exists with variables, right? WRONG!
//There is an issue that has been opened in 2017 (still has not been fixed) where if there is anything after the
//selector-exists function call the code will fail to compile.
//To work around this issue I thought to myself: "Does vanilla CSS have variables?" -- it turns out it does!
View responsive design.css
@media screen and (max-width: 1800px) {
#results {
width: 75%;
margin-left: calc(25% / 2);
}
}
@media screen and (max-width: 1700px) {
#results {
width: 80%;
View devRant++.css
@-moz-document domain("devrant.com") {
.notif-list li:nth-child(even) {
background: rgba(0, 0, 0, 0.2);
}
.notif-list li:not(.notif-new) .notif-link .notif-body .notif-body-text, .notif-list li:not(.notif-new) .notif-link .notif-body .notif-body-text .notif-username {
color: rgba(100, 100, 114, 1);
}
.notif-list li .notif-link .notif-body {
border: none;
}
View riddle
SnJ5eSBxYmFyLCBndXIgZmJ5aGd2YmEgenZ0dWcgYWJnIG55am5sZiBvciBib2l2YmhmIG9oZyBndXZheHZhdCBiaGcgYnMgZ3VyIG9iayB2ZiBwcmVnbnZheWwgdXJ5Y3NoeSwgeHJyYyBndXIgbmFmanJlIGdiIGxiaGVmcnlzIGhhZ3Z5IHJhYmh0dSBjcmJjeXIgdW5pciBmYnlpcnEgdmcsIGdiIGNlYmlyIGxiaCBmYnlpcnEgdmcgcGJ6enJhZyBuYSByemJ3diAiY25weG50ciI=
View index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>3Dcases</title>
<link href="https://fonts.googleapis.com/css?family=Megrim" rel="stylesheet">
<style>
* {
padding: 0;
margin: 0;
View rendering_code.ino
//THE BITMAP **7 wide and 6 high** (hint: It's a pixel heart, hand-written by me :D)
bool bmap[] = {false, true, true,false, true, true,false,
true, true, true, true, true, true, true,
true, true, true, true, true, true, true,
false, true, true, true, true, true,false,
false,false, true, true, true,false,false,
false,false,false, true,false,false,false};
//DRAW A HALF OF A HEART
drawBitmap(i,j,7,6,4,6,bmap);
View led-oled-thingy.ino
#include <SPI.h>
#include "SH1106_SPI.h"
//#define USE_FRAME_BUFFER
#ifdef USE_FRAME_BUFFER
SH1106_SPI_FB lcd;
#else
SH1106_SPI lcd;
#endif
View TwoDimensionalLineGraph.java
package net.d3add3d.d3processingutils;
import processing.core.PApplet;
public class TwoDimensionalLineGraph {
private PApplet parent;
private float[] values;
private int spcx, spcy, startx, starty;
private boolean drawGrid;