Skip to content

Instantly share code, notes, and snippets.

View XReyRobert's full-sized avatar
😜

XRR XReyRobert

😜
View GitHub Profile
@XReyRobert
XReyRobert / gist:21eabbbcf69a7b23c976d568173f395f
Created January 12, 2026 21:26
Local web page to use full screen youtube videos with plast (macos)
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="referrer" content="strict-origin-when-cross-origin" />
<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1" />
<style>
html, body {
margin: 0 !important;
@XReyRobert
XReyRobert / gist:1551268eb38dc87e03e2d92099157a4c
Created January 4, 2026 17:12
Set a new iterm2 tab color for each session
echo '
# Set iTerm2 tab/title “chrome” color (RGB values 0–255)
iterm_tabcolor() {
local colors=(
"255 0 0" # Red
"0 255 0" # Green
"0 0 255" # Blue
"255 255 0" # Yellow
"0 255 255" # Cyan
"255 0 255" # Magenta
@XReyRobert
XReyRobert / gist:3dfbc3f8ed1a24340bbb9e6636065ee2
Last active January 4, 2026 13:27
uncheck all interests in X (paste in console)
(async () => {
const sleep = ms => new Promise(res => setTimeout(res, ms));
const rand = (min, max) => min + Math.random() * (max - min);
let total = 0;
let stable = 0;
let lastScroll = -1;
let sinceRest = 0;
while (stable < 4) {
@XReyRobert
XReyRobert / dialog.md
Created October 12, 2024 00:19
Solar System generation Qwen32 quantized 29GB

USER

I want a realistic solar system simulation written in javascript. You will code all in a single Html page. respect the distances, the sizes, and allow zoom in zoom out. It's an heliocentric view seen from above

ASSISTANT

Sure! Below is a simplified but functional example of a solar system simulation in JavaScript embedded within an HTML file. This example uses basic HTML, CSS, and JavaScript to create a heliocentric view seen from above. The sizes and distances are scaled down for visual clarity.

<!DOCTYPE html>
<html lang="en">
<head>
@XReyRobert
XReyRobert / ssacli_to_json.py
Created February 28, 2024 21:56
ssacli_to_json.py
#!/usr/bin/env python3
import sys
import json
def parse_value(value):
try:
# Try converting to integer
return int(value)
except ValueError:
try:
#!/bin/bash
# Check if three arguments are passed to the script
if [ "$#" -ne 3 ]; then
echo "Usage: $0 <REMOTE_HOST> <VOLUME_NAME> <ARCHIVE_PATH>"
exit 1
fi
REMOTE_HOST=$1
VOLUME_NAME=$2
@XReyRobert
XReyRobert / applesoft_basic_chat.bas
Created April 8, 2023 21:28
AppleSoft BASIC Chat-Like Dialog for Apple //e
10 PRINT "HELLO! WHAT IS YOUR NAME?"
20 INPUT N$
30 PRINT "NICE TO MEET YOU, " + N$ + "!"
40 PRINT "HOW ARE YOU DOING TODAY? (GOOD/BAD)"
50 INPUT A$
60 IF A$ = "GOOD" THEN GOTO 80
70 IF A$ = "BAD" THEN GOTO 90
75 PRINT "I DIDN'T UNDERSTAND. PLEASE ANSWER WITH 'GOOD' OR 'BAD'."
76 GOTO 40
80 PRINT "I'M GLAD TO HEAR THAT, " + N$ + "!"
@XReyRobert
XReyRobert / ExampleResource.java
Created April 8, 2023 17:46
Quarkus Hello World Application
package com.example;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
@Path("/hello")
public class ExampleResource {
@XReyRobert
XReyRobert / cpuset.sh
Last active April 7, 2023 11:36
A shell function to use/extend cpuctl with cpu ranges on macosUsage: cpuset { offline | online } <start_cpu1>-<end_cpu1> [ <start_cpu2>-<end_cpu2>... ]
# A shell function to manage multiple CPUs using cpuctl on macos
# XRR 2023
# Usage: cpuset { offline | online } <start_cpu1>-<end_cpu1> [ <start_cpu2>-<end_cpu2>... ]
cpuset() {
action=$1
shift
if [ "$action" != "offline" ] && [ "$action" != "online" ]; then
echo "Invalid action: $action"
@XReyRobert
XReyRobert / LYWSD03MMC.py
Last active January 18, 2020 11:54
LYWSD03MMC to Vera quick hack
#!/usr/bin/python3
from bluepy import btle
import argparse
import os
import re
import requests
import time
veraip = "192.168.1.39"