Skip to content

Instantly share code, notes, and snippets.

View eval's full-sized avatar
💭
ƛ

Gert Goet eval

💭
ƛ
View GitHub Profile
@LoueeD
LoueeD / bsky-comments.js
Last active January 24, 2025 04:10
bluesky comments web component - inspired by emilyliu and coryzue
// Moved to a github repo for versioning, the file can now be loaded from a CDN
// <script type="module" src="https://esm.sh/gh/loueed/[email protected]/comments"></script>
class BskyComments extends HTMLElement {
constructor() {
super();
this.attachShadow({ mode: "open" });
this.visibleCount = 3;
this.thread = null;
this.error = null;
@PEZ
PEZ / fuzzy.cljs
Last active November 3, 2024 13:07
Joyride script for adding fuzzy search in files with instant previews to VS Code
(ns fuzzy
(:require ["vscode" :as vscode]
[clojure.string :as string]
[joyride.core :as joyride]
[promesa.core :as p]))
(defn- get-configured-exclude-patterns! []
(->> ["search.exclude" "files.exclude"]
(mapcat (fn [config-key]
(-> (.get (vscode/workspace.getConfiguration) config-key)
@kyrylo
kyrylo / colorized_logger.rb
Last active January 8, 2025 07:07
Nice colorized logs for Rails apps! With this initializer, you can instantly colorize your Rails development logs. Just copy and paste the code, and it’ll work. https://x.com/kyrylosilin/status/1852308566201237815
# frozen_string_literal: true
# config/initializers/colorized_logger.rb
# This initializer adds color to the Rails logger output. It's a nice way to
# visually distinguish log levels.
module ColorizedLogger
COLOR_CODES = {
debug: "\e[36m", # Cyan
info: "\e[32m", # Green
warn: "\e[33m", # Yellow
@rameerez
rameerez / kamal-production-server-setup.sh
Last active April 24, 2025 09:05
Set up a Ubuntu server to deploy Kamal 2.x Docker containers to, hardened security and production ready
#!/bin/bash
# Production Docker Host Hardening Script v2
# For Ubuntu Server 24.04 LTS (Noble)
# Suitable for both Kamal deployment and builder hosts
set -euo pipefail
IFS=$'\n\t'
# --- Constants ---
@thesamesam
thesamesam / xz-backdoor.md
Last active April 7, 2025 09:15
xz-utils backdoor situation (CVE-2024-3094)

FAQ on the xz-utils backdoor (CVE-2024-3094)

This is a living document. Everything in this document is made in good faith of being accurate, but like I just said; we don't yet know everything about what's going on.

Update: I've disabled comments as of 2025-01-26 to avoid everyone having notifications for something a year on if someone wants to suggest a correction. Folks are free to email to suggest corrections still, of course.

Background

@levelsio
levelsio / gist:5bc87fd1b1ffbf4a705047bebd9b4790
Last active March 31, 2025 01:23
Secret of Monkey Island: Amsterdam (by @levelsio) or how to create your own ChatGPT image+text-based adventure game
# 2023-11-27 MIT LICENSE
Here's the open source version of my ChatGPT game MonkeyIslandAmsterdam.com.
It's an unofficial image+text-based adventure game edition of Monkey Island in Amsterdam, my home town.
Please use it however you want. It'd be nice to see more ChatGPT-based games appear from this. If you get inspired by it, please link back to my X https://x.com/levelsio or this Gist so more people can do the same!
Send me your ChatGPT text adventure game on X, I'd love to try it!
@mxcl
mxcl / stargazer.sh
Last active October 31, 2023 17:22
All-in-one Script to Generate your @pomber/stargazer video
#!/usr/bin/env -S pkgx +git +gum +gh +npm +jq bash
# ^^ curl https://pkgx.sh | sh
# ^^ pkgx makes all those tools (including bash!) available to the script
# no packages are installed; your system remains pristine
set -eo pipefail
if [ -d stargazer/.git ]; then
cd stargazer
elif [ ! -d .git ] && gum confirm 'clone to ./stargazer?'; then
@blake-ctrl
blake-ctrl / allow-unsafe-eval.patch
Last active March 16, 2024 17:04
Chromium Patch to allow Javascript 'unsafe-eval' in manifest v3 extensions. DEVELOPMENT TOOL TO ENABLE CLJS HOT-RELOADING
From 36a4180bd37e851686b95ac4aac5bfe22036ce49 Mon Sep 17 00:00:00 2001
From: root <[email protected]>
Date: Tue, 19 Sep 2023 02:53:45 +0000
Subject: [PATCH] Hacks to allow unsafe-eval in mv3 chrome extensions
---
chrome/browser/ash/system_web_apps/apps/terminal_source.cc | 2 +-
extensions/common/csp_validator.cc | 2 +-
extensions/common/manifest_handlers/csp_info.cc | 6 +++---
3 files changed, 5 insertions(+), 5 deletions(-)
@yatish27
yatish27 / document.rb
Created September 5, 2023 05:23
YARD Cheatsheet
# Represents a generic document in a document management system.
# @abstract
# @author John Doe
# @since 1.0.0
# @deprecated Use NewDocument instead.
class Document
# @!attribute [r] title
# @return [String]
attr_reader :title