Skip to content

Instantly share code, notes, and snippets.

@em-deltaxp
em-deltaxp / DB6171EC-B392-4398-8563-23BE31A9CFB7.js
Last active October 11, 2024 05:59
AF9943C2-B777-47DC-B55F-FBF00582A18E
async function* events(target, name, done, first, last, options) {
done = done || (() => false);
let resolveEvent = null;
function listener(e) {
resolveEvent(e);
if (!done.apply(target)) {
resolveEvent = null;
}
}
@em-deltaxp
em-deltaxp / cups-browsed.md
Created September 27, 2024 01:19 — forked from stong/cups-browsed.md
CUPS disclosure leaked online. Not my report. The original author is @evilsocket

Original report

  • Affected Vendor: OpenPrinting
  • Affected Product: Several components of the CUPS printing system: cups-browsed, libppd, libcupsfilters and cups-filters.
  • Affected Version: All versions <= 2.0.1 (latest release) and master.
  • Significant ICS/OT impact? no
  • Reporter: Simone Margaritelli [[email protected]]
  • Vendor contacted? yes The vendor has been notified trough Github Advisories and all bugs have been confirmed:
package main
import (
"fmt"
"log"
"runtime"
)
func main() {
log.Println("Starting program...\n")
package main
import "fmt"
type ComparableStringer interface {
comparable
fmt.Stringer
}
type IntComparableStringer int
package main
import "fmt"
type Printable interface {
~int | ~float64
fmt.Stringer
}
func PrintPrintable[T Printable](p T) {
@em-deltaxp
em-deltaxp / go.mod
Last active September 25, 2024 21:56
module example.com/trsz
go 1.22.2
require golang.org/x/term v0.24.0
require golang.org/x/sys v0.25.0
(function () {
const serdomStr = document.querySelector('html').outerHTML;
const b = new Blob([serdomStr], {type: 'application/octet-stream'});
const u = URL.createObjectURL(b);
window.location = u;
})();
// gcc -o calculator calculator.c
#include <stddef.h>
#include <stdint.h>
#include <stdbool.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <termios.h>
#include <unistd.h>
@em-deltaxp
em-deltaxp / tmp-75QDpmeAU5.py
Created September 9, 2024 08:59
some color swatches
#!/usr/bin/env python3
# tmp-75QDpmeAU5.py -- [Pythonista v3.4 (iOS)]
import sys
import ui
SIDE_LENGTH=10
STEP_COUNT=4
COLOR_COMPONENT_LIMIT=256
package main
import (
"fmt"
"golang.org/x/tour/tree"
)
// Walk walks the tree t sending all values
// from the tree to the channel ch.