Skip to content

Instantly share code, notes, and snippets.

View MystPi's full-sized avatar

MystPi

  • 15:18 (UTC -04:00)
View GitHub Profile
@adtac
adtac / Dockerfile
Last active May 28, 2024 01:38
#!/usr/bin/env docker run
#!/usr/bin/env -S bash -c "docker run -p 8080:8080 -it --rm \$(docker build --progress plain -f \$0 . 2>&1 | tee /dev/stderr | grep -oP 'sha256:[0-9a-f]*')"
# syntax = docker/dockerfile:1.4.0
FROM node:20
WORKDIR /root
RUN npm install sqlite3
@leobm
leobm / main.gleam
Last active November 3, 2023 11:35
import writer
import string_writer
pub fn main() {
string_writer.create()
|> writer.write("Text1")
|> writer.write("Text2")
|> string_writer.print()
}
@webdev03
webdev03 / README.md
Created October 2, 2023 22:44
Wall of Followers Project Thumbnail

Wall of Followers Project Thumbnail

To use this you will need to run

npm install meowclient canvas dotenv

Then create a .env file in this format

SCRATCH_USERNAME=user
SCRATCH_PASSWORD=pass
class RecursiveDescentParser<T extends { type?: string }> {
private readonly tokens: T[];
private current = 0;
constructor(tokens: T[]) {
this.tokens = tokens;
}
/**
* Check if the current token matches one of the given types
@WebReflection
WebReflection / esx.md
Last active May 26, 2024 02:33
Proposal: an ESX for JS implementation
@jjant
jjant / Lang.elm
Created July 5, 2021 17:51
linear types in elm v1
module Lang exposing (..)
import Dict exposing (Dict)
import Type exposing (..)
type Lit
= IntLit Int
| CharLit Char
@CST1229
CST1229 / ScratchBigSearchBookmark.txt
Last active July 24, 2021 18:23
Scratch Expanding Search Bar Bookmarklet (v4)
This bookmarklet expands the search bar when it is focused, similar to the wiki.
This is inspired by a suggestion I saw.
Versions
v1: Initial release
v2: Updated to use functions in the scratch-www events to prevent copy-pasting code
v2.1: Fixed a bug that prevented the search bar from unexpanding
v3: Tweaked to allow dynamic enabling and disabling (not in the bookmarklet though)
v4: Updated to catch up with the SA PR (obiviously with the addon APIs removed)
@JoeyBurzynski
JoeyBurzynski / 55-bytes-of-css.md
Last active July 3, 2024 17:43
58 bytes of css to look great nearly everywhere

58 bytes of CSS to look great nearly everywhere

When making this website, i wanted a simple, reasonable way to make it look good on most displays. Not counting any minimization techniques, the following 58 bytes worked well for me:

main {
  max-width: 38rem;
  padding: 2rem;
  margin: auto;
}
@munificent
munificent / generate.c
Last active May 14, 2024 05:30
A random dungeon generator that fits on a business card
#include <time.h> // Robert Nystrom
#include <stdio.h> // @munificentbob
#include <stdlib.h> // for Ginny
#define r return // 2008-2019
#define l(a, b, c, d) for (i y=a;y\
<b; y++) for (int x = c; x < d; x++)
typedef int i;const i H=40;const i W
=80;i m[40][80];i g(i x){r rand()%x;
}void cave(i s){i w=g(10)+5;i h=g(6)
+3;i t=g(W-w-2)+1;i u=g(H-h-2)+1;l(u
@frontdevops
frontdevops / darkthemeswitcher-inline.js
Last active May 5, 2024 17:54
Simple Dark Theme Bookmarklet for web pages
javascript:(d=>{var css=`:root{background-color:#fefefe;filter:invert(100%)}*{background-color:inherit}img:not([src*=".svg"]),video{filter: invert(100%)}`,style,id="dark-theme-snippet",ee=d.getElementById(id);if(null!=ee)ee.parentNode.removeChild(ee);else {style = d.createElement('style');style.type="text/css";style.id=id;if(style.styleSheet)style.styleSheet.cssText=css;else style.appendChild(d.createTextNode(css));(d.head||d.querySelector('head')).appendChild(style)}})(document)