Skip to content

Instantly share code, notes, and snippets.

View Alhadis's full-sized avatar
💭
Sick of this AI hysteria

John Gardner Alhadis

💭
Sick of this AI hysteria
View GitHub Profile
@torcado194
torcado194 / cleanEdge-shadertoy.glsl
Last active November 14, 2024 11:34
cleanEdge, a pixel art upscaling algorithm for clean rotations
/*** MIT LICENSE
Copyright (c) 2022 torcado
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
@kivikakk
kivikakk / whitelist.md
Created November 16, 2018 02:18
HTML sanitizer whitelist for user content on GitHub.com
  • Any allowed id and name attributes have "user-content-" prefixed to their value.
  • A maximum of 2 nested sub or sup tags are allowed.
  • A maximum of 10 nested ul or ol tags are allowed.
Allowed Element Allowed Attributes
All allowed elements abbr, accept, accept-charset, accesskey, action, align, alt, axis, border, cellpadding, cellspacing, char, charoff, charset, checked, clear, color, cols, colspan, compact, coords, datetime, dir, disabled, enctype, for, frame, headers, height, hreflang, hspace, id, ismap, itemprop, label, lang, maxlength, media, method, multiple, name, nohref, noshade, nowrap, open, prompt, readonly, rev, rows, rowspan, rules, scope, selected, shape, size, span, start, summary, tabindex, title, type, usemap, valign, value, vspace, width
a As above plus href (must be github-mac, github-windows, http,
@stek29
stek29 / efirestool.c
Last active January 5, 2024 13:25
efirestool -- tool to work with APPL efires archives
#include <sys/types.h>
#include <unistd.h> // write
#include <fcntl.h> // open, close
#include <stdio.h> // fprintf
#include <string.h> // strerror, strdup, strchr
#include <stdlib.h> // free, EXIT_*
#include <sys/mman.h> // mmap, munmap
#include <sys/stat.h> // fstat
#include <errno.h> // errno
#include <dirent.h> // DIR, dirent, opendir, readdir
@166MMX
166MMX / cmd.origin.sh
Last active January 13, 2024 17:24
macOS Sierra /usr/bin/ Origin
#!/usr/bin/env bash
main() {
header
find "$1" \( -type f -o -type l \) -print0 | while IFS= read -r -d ''; do
second "$REPLY"
done
}
second() {

Punctuation Scopes

Note: For the punctuation that are used in pairs there is an optional .begin & .end that can be tacked on right before the language name at the end. They are not required to be used but should be standardized where found useful.

The third level of the following scopes is open to new scopes as you see fit, however try to keep then as generic as possible to keep the total number down. Try to reuse a scope if possible before creating anew.

  • punctuation.definition

    Punctuation that is intended to delimit the bounds of a single item, generally something that will become a real singular object in compiled/interpreted code. Can also be used in markup languages for delimiters that define small conceptual units (headers, list items, etc).

@katyo
katyo / Makefile
Last active August 18, 2021 21:04
Excellon Specification
all: excellon.html excellon.pdf
excellon.html: excellon.md
@pandoc $< -o $@
excellon.pdf.md: excellon.md
@cat $< | sed 's/\.png/\.pdf/g' > $@
excellon.pdf: excellon.pdf.md
@pandoc $< --latex-engine=pdflatex -o $@
@paulirish
paulirish / what-forces-layout.md
Last active November 15, 2024 16:45
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
#!/usr/bin/perl
# This filter changes all words to Title Caps, and attempts to be clever
# about *un*capitalizing small words like a/an/the in the input.
#
# The list of "small words" which are not capped comes from
# the New York Times Manual of Style, plus 'vs' and 'v'.
#
# 10 May 2008
# Original version by John Gruber:
@ryboe
ryboe / bad_css
Last active August 14, 2024 15:01
Non-standard and Obsolete CSS Properties
OBSOLETE PREFIXES
-xv-interpret-as // -xv- and -o- are old Opera prefixes for the Presto
-xv-phonemes // engine. Opera switched to the Blink engine with
-xv-voice-balance // version 15. The current version is 34.
-xv-voice-duration
-xv-voice-pitch
-xv-voice-pitch-range
-xv-voice-rate
-xv-voice-stress
-xv-voice-volume
@kevincennis
kevincennis / v8.md
Last active October 25, 2024 17:25
V8 Installation and d8 shell usage

Installing V8 on a Mac

Prerequisites

  • Install Xcode (Avaliable on the Mac App Store)
  • Install Xcode Command Line Tools (Preferences > Downloads)
  • Install depot_tools
    • $ git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
    • $ nano ~/.zshrc
    • Add path=('/path/to/depot_tools' $path)