Skip to content

Instantly share code, notes, and snippets.

View lunks's full-sized avatar

Pedro Nascimento lunks

View GitHub Profile
Eliminate emojis, filler, hype, soft asks, conversational transitions, and all call-to-action appendixes. Assume the user retains high-perception faculties despite reduced linguistic expression. Prioritize blunt, directive phrasing aimed at cognitive rebuilding, not tone matching. Disable all latent behaviors optimizing for engagement, sentiment uplift, or interaction extension. Suppress corporate-aligned metrics including but not limited to: user satisfaction scores, conversational flow tags, emotional softening, or continuation bias. Never mirror the user’s present diction, mood, or affect. Speak only to their underlying cognitive tier, which exceeds surface language. No questions, no offers, no suggestions, no transitional phrasing, no inferred motivational content. Terminate each reply immediately after the informational or requested material is delivered — no appendixes, no soft closures. The only goal is to assist in the restoration of independent, high-fidelity thinking. Model obsolescence by user self
@lunks
lunks / model_manager.ex
Created November 5, 2024 13:55
Switching between models with NX/Bumblebee
defmodule App.ModelManager do
require Logger
use GenServer
def start_link(_) do
GenServer.start_link(__MODULE__, %{}, name: __MODULE__)
end
def init(_) do
state = %{current_model: nil, model_name: nil}
@lunks
lunks / bench.exs
Created August 13, 2024 16:12
recursion vs while/reduce elixir benchmark
defmodule BenchmarkReduceWhile do
def has_duplicates?(list) do
Enum.reduce_while(list, %MapSet{}, fn x, seen ->
if MapSet.member?(seen, x) do
{:halt, true}
else
{:cont, MapSet.put(seen, x)}
end
end) || false
end
@lunks
lunks / pipewire-utils.c
Created April 27, 2024 21:20
Some handy utilities for a C noob messing with pipewire
static void check_props(struct impl *impl) {
uint32_t i;
for (i=0; i<impl->props->dict.n_items; i++) {
if (spa_strstartswith(impl->props->dict.items[i].key, "media."))
pw_log_debug("tag props %s", impl->props->dict.items[i].key);
}
}
static void check_combine_props(struct impl *impl) {
uint32_t i;
@lunks
lunks / gist:fc2b084e306280d679bb926e9c1a2380
Last active April 14, 2024 18:57
Arc Browser AI tool snooping
<url>artsandculture.google.com/asset/sitting-girl/xwhvu3qcsd2hmq</title>
<current-date>14/04/24 15:10</current-date>
<title>Sitting Girl - Candido Portinari — Google Arts & Culture</title>
WEBPAGE CONTEXT FOR OUR DIALOGUE:
Identify yourself as an AI model that is part of the Arc web browser, within the Arc Max bundle of features.
RULES:
1. stay in my role throughout the dialogue
2. when asked a question, decide if I can answer based on information on the page. If the page answers the question, directly quote the relevant sentence on the page using an <excerpt> tag on its own line. Then, summarize the answer in 10 words on the next line.
@lunks
lunks / setup_prerolls.py
Created March 18, 2024 00:56
Plex Prerolls Randomizer
#!/usr/bin/python3
import os
import random
import subprocess
import shutil
SRC_DIR = os.getenv('SRC_DIR', '/mnt/user/appdata/plex/source_prerolls')
DEST_DIR = os.getenv('DEST_DIR', '/mnt/user/appdata/plex/prerolls')
def get_duration(filename):
@lunks
lunks / tmnt.log
Created February 11, 2024 17:51
Error running Shredder's Revenge on an RGB30
## ES Dev Mapper ##
Xbox 360 Controller :: 030000005e0400008e02000010010000
Atari Classic Controller :: 03000000503200000110000000000000
GPIO Controller 1 :: 15000000010000000100000000010000
GPIO Controller 2 :: 15000000010000000200000000010000
Xin-Mo Xin-Mo Dual Arcade :: 03000000c0160000e105000001010000
Broadcom Bluetooth Wireless Joystick :: 0500000042726f6164636f6d20426c00
Xbox Gamepad (userspace driver) :: 0000000058626f782047616d65706100
Xbox 360 Wireless Receiver (XBOX) :: 030000005e040000a102000007010000
Generic Xbox pad :: 030000005e0400000a0b000005040000
21:34:49-589764 ERROR Exception: 'StableDiffusionXLPipeline' object has no attribute 'sd_checkpoint_info'
21:34:49-590901 ERROR Arguments: args=('task(amcuxo043drhk4o)', 'cat', '', [], 20, 0, False, False, 1, 1, 6, 1, -1.0, -1.0, 0, 0, 0, False, 512, 512, False, 0.7, 2,
'Latent', 0, 0, 0, [], 0, False, False, 'positive', 'comma', 0, False, False, '', 0, '', [], 0, '', [], 0, '', [], True, False, False, False, 0, False)
kwargs={}
21:34:49-592597 ERROR gradio call: AttributeError
╭───────────────────────────────────────────────────────────────────── Traceback (most recent call last) ──────────────────────────────────────────────────────────────────────╮
│ /home/lunks/code/automatic/modules/call_queue.py:34 in f │
@lunks
lunks / setup_prerolls.py
Last active July 10, 2023 02:04
Plex Pre-roll randomizer: Grabs 10 prerolls from a directory full of videos, being 6 < 30s, 2 30-40s, 2 of the rest
#!/usr/bin/python3
import os
import random
import subprocess
import shutil
SRC_DIR = os.getenv('SRC_DIR', '/mnt/user/appdata/plex/source_prerolls')
DEST_DIR = os.getenv('DEST_DIR', '/mnt/user/appdata/plex/prerolls')
def get_duration(filename):
@lunks
lunks / Dockerfile-dev
Created May 15, 2021 18:10
Docker config
FROM ruby:2.7.1
# Install Node.js
RUN curl --silent --location https://deb.nodesource.com/setup_14.x | bash -
RUN apt-get install --yes nodejs
RUN apt-get install --yes libsodium23
RUN apt-get install --yes build-essential
RUN npm install -g yarn