Skip to content

Instantly share code, notes, and snippets.

View lunks's full-sized avatar

Pedro Nascimento lunks

View GitHub Profile
@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
@lunks
lunks / database.yml
Created March 19, 2021 21:51
An example of a database.yml configuration I'm currently using.
default: &default
adapter: postgresql
encoding: utf8
pool: <%= ENV.fetch("RAILS_MAX_THREADS", 5) %>
local: &local
<<: *default
host: <%= ENV.fetch("PGHOST", "localhost") %>
username: <%= ENV.fetch("PGUSER", `whoami`.strip) %>
password: <%= ENV.fetch("PGPASSWORD", "") %>
@lunks
lunks / just-refactor.rb
Last active August 1, 2020 14:14
u-case examples/proposals
class User::Create < Micro::Case
attributes :name, :age
def call!
return invalid_user unless valid?
if User.create(name: name, age: age)
Success
else
Failure
@lunks
lunks / usecases_config.rb
Created July 28, 2020 03:47
u-case config proposal
# Feedbacks:
#Remover os níveis extras i.e.
Micro::Case.config do |config|
config.enable_activemodel_validations = true
config.disable_transitions = true
config.disable_the_use_case_access_when_success = true
end
@lunks
lunks / cookie clicker bookmarklet
Last active May 6, 2020 05:38 — forked from met4000/cookie clicker bookmarklet
An autoclick bookmarklet for CC.