Skip to content

Instantly share code, notes, and snippets.

View nobkd's full-sized avatar
🦩
Whatever.

nobkd

🦩
Whatever.
  • 22:59 (UTC +02:00)
View GitHub Profile
@CodeIter
CodeIter / termux-pacman-glibc-setup.sh
Last active March 22, 2025 19:20
Setup `glibc-runner` with pacman on Termux and install Deno.JS and Bun.JS .
#!/usr/bin/env -S bash -xeuo pipefail
set -xeuo pipefail
pkg install pacman patchelf \
which time ldd tree
echo
echo
@jdegenstein
jdegenstein / build123d-OCP.code-snippets
Last active February 6, 2025 03:18
VSCode Snippet for build123d + OCP CAD Viewer modeling / speed running
{
// build123d CodeCAD speedmodeling snippet by Jern
//
// This was specifically designed for use with TooTallToby's modeling challenges, but applicable for
// all CodeCAD modeling, but customize as desired for your own needs. This provides:
// 1. A file template that reduces the time necessary to "just start coding/modeling"
// 2. Shortcuts like "?ebds + TAB" that creates a BuildSketch + extrude block
//
// recommended to bind "Snippets: Fill file with Snippet" to e.g. CTRL + ALT + N
// recommended to bind "Jupyter: Restart Kernel" to e.g. CTRL + ALT + /
@jojojojojoj5564656465465
jojojojojoj5564656465465 / unocss.config.ts
Last active September 25, 2024 07:51
unocss config shortcuts rules best rules shortcut based on tailwind
import {
defineConfig,
presetAttributify,
presetIcons,
presetTagify,
presetWind,
transformerDirectives,
transformerVariantGroup,
} from "unocss";
//import fs from "node:fs/promises";
@danielroe
danielroe / settings.json
Last active April 19, 2025 06:36
VScode settings for a minimal UI
{
// Disable telemetry
"telemetry.telemetryLevel": "off",
// Zen mode
"zenMode.fullScreen": false,
"zenMode.hideTabs": true,
"zenMode.centerLayout": false,
// Theming
"workbench.iconTheme": "city-lights-icons-vsc",
"editor.fontFamily": "Dank Mono",

Log4J CVE Advisory

The Problem

Log4J has a feature called Java Naming and Directory Interface (shortened to JNDI in this document), which allows a Java program to reach out to an external source to gather data.
If you put a section of text containing ${jndi:query} into the log, the Log4J library will try to resolve the query.
This can be combined with the Lightweight Directory Access Protocol (LDAP) to connect to a remote server.

However, because JNDI is built for retrieving data, and JNDI is a Java program, if you put a JNDI query using LDAP into a log, it will connect to the given site, download a file, and then execute it.
This is called Remote Code Execution.

@AnatomicJC
AnatomicJC / android-backup-apk-and-datas.md
Last active April 18, 2025 18:48
Backup android app, data included, no root needed, with adb

Backup android app, data included, no root needed, with adb

Note: This gist may be outdated, thanks to all contributors in comments.

adb is the Android CLI tool with which you can interact with your android device, from your PC

You must enable developer mode (tap 7 times on the build version in parameters) and install adb on your PC.

Don't hesitate to read comments, there is useful tips, thanks guys for this !

@scmx
scmx / using-details-summary-github.md
Last active April 17, 2025 04:53
Using <details> <summary> expandable content on GitHub with Markdown #details #summary #markdown #gfm #html

How to use <details> <summary> expandable content on GitHub with Markdown

Firstly, what is <details> <summary>?

The HTML Details Element (<details>) creates a disclosure widget in which information is visible only when the widget is toggled into an "open" state. A summary or label can be provided using the <summary> element. https://developer.mozilla.org/en-US/docs/Web/HTML/Element/details.

Example

@hediet
hediet / main.md
Last active April 7, 2025 18:00
Proof that TypeScript's Type System is Turing Complete
type StringBool = "true"|"false";


interface AnyNumber { prev?: any, isZero: StringBool };
interface PositiveNumber { prev: any, isZero: "false" };

type IsZero<TNumber extends AnyNumber> = TNumber["isZero"];
type Next<TNumber extends AnyNumber> = { prev: TNumber, isZero: "false" };
type Prev<TNumber extends PositiveNumber> = TNumber["prev"];
@donmccurdy
donmccurdy / .block
Last active January 31, 2023 21:02
perlin noise, animated lines, and SVG filters
license: mit
@benhoyt
benhoyt / atomic_counter.py
Created August 3, 2016 13:12
An atomic, thread-safe incrementing counter for Python
"""An atomic, thread-safe incrementing counter."""
import threading
class AtomicCounter:
"""An atomic, thread-safe incrementing counter.
>>> counter = AtomicCounter()
>>> counter.increment()