Skip to content

Instantly share code, notes, and snippets.

View XReyRobert's full-sized avatar
😜

XRR XReyRobert

😜
View GitHub Profile
@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"
@XReyRobert
XReyRobert / kapre_testing_colab_bench_issue61.ipynb
Last active November 26, 2019 13:42
kapre_testing_colab_bench_Issue61.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@XReyRobert
XReyRobert / kapre_testing_colab_bench.ipynb
Last active November 26, 2019 13:19
Kapre_Testing_Colab_Bench.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@XReyRobert
XReyRobert / gist:e2ab1e0838dc080eac23feccabf67c94
Created December 27, 2018 22:23
AppleMonitorII_Condensateurs_Capacitors_ElectrolytiC
C101 22 uF 450 001590532
C102 220 uF 001475974
C104 22 uF 16 001325871
C108 220 uF 50 000422056
C109 10 uF 25 001325870
C110 470 uF 001328832
C113 10 uF 25 001325870
C203 100 UF 25 001301761
C205 220 uF 001475974
C209 1 uF 50 001280690
@XReyRobert
XReyRobert / Apple IIe - Condensateurs_Capacitors _AA11042
Last active April 24, 2018 21:51
Apple //e - Apple IIe - Astec AA11042C - Alimentation / Power - Liste des Condensateurs chimiques / electrolytic capacitors list
C1 250V 0,1µF anti parasite http://www.conrad.fr/ce/fr/product/450208/Condensateur-anti-parasite-MKP-X2-450208-01-F-275-VAC-10-Pas-15-mm-L-x-l-x-h-18-x-5-x-11-mm-1-pcsC0
?? 0,47µF anti parasite http://www.conrad.fr/ce/fr/product/450256/Condensateur-anti-parasite-MKP-X2-450256-047-F-275-VAC-10-Pas-225-mm-L-x-l-x-h-265-x-85-x-17-mm-1-pcs
C12 16V 1000µF Chimique http://www.conrad.fr/ce/fr/product/1281559/Condensateur-electrolytique-105-C-Wuerth-Elektronik-860160375032-sortie-radiale-5-mm-1000-F-16-V-x-h-10-mm-x-16-mm
C13 16V 1000µF Chimique " " "
C14 16V 1000µF Chimique " " "
C19 16V 1000µF Chimique " " "
C20 16V 1000µF Chimique " " "