Skip to content

Instantly share code, notes, and snippets.

View ruilvo's full-sized avatar
🛰️

Rui Oliveira ruilvo

🛰️
View GitHub Profile
@ruilvo
ruilvo / gemini_705.md
Last active April 8, 2026 07:35
Gemini on Icom 705 vs FTX1F vs G90
title Comment on these 3 radios
platform Gemini
messages 44
exported_at 2026-04-08
source gemini.google.com
exporter universal-ai-exporter

You:

@ruilvo
ruilvo / .env
Created January 26, 2025 14:35
Docker static HTML + SFTP
SFTP_USERS=SOME_USER:SOME_PW:1001
@ruilvo
ruilvo / at_commands.txt
Created December 22, 2023 09:38
Huawei B310s-22 AT commands
root@p711:/ # atc at+clac
atc at+clac
+CPBS AT+CPBS command is used to select the phonebook storage
+CPBR AT+CPBR AT command returns entries from the device's phonebook.
+CPBW AT+CPBW – Write phonebook entry
+CNUM The +CNUM command returns the subscriber Mobile Station International Subscriber Directory Number (MSISDN).
+CPBF AT+CPBF AT command returns phobebook entries from the SIM based on the search parameter.
+CCHO AT+CCHO At command is used to open a session with UICC so that commmands can be sent over the UICC logical channels.
+CCHC AT+CCHC AT command closes the session with UICC.
@ruilvo
ruilvo / bingchat.cmake
Created August 4, 2023 10:59
BYPRODUCTS on cmake
The BYPRODUCTS argument on add_custom_command is used to specify the files that
the command is expected to produce but whose modification time may or may not be
updated on subsequent builds
https://cmake.org/cmake/help/latest/command/add_custom_command.html. This
argument is useful for several reasons:
• It helps the Ninja generator to know how to regenerate the byproducts when
they are missing
https://cmake.org/cmake/help/latest/command/add_custom_command.html.
@ruilvo
ruilvo / peak_detect.v
Created July 20, 2023 14:20
Verilog SONAR
module peak_detect(
//-----------------------------------------------
// Global signals
input DIN_RDY, // data in is ready AKA 48kHz clock
input starttx, //so we know when we start counting
input endtx,
input clock, // master clock, active in posedge
input reset, // master reset, synchronous, active high
input corr_rdy, // New correlation available
@ruilvo
ruilvo / bard.md
Created July 19, 2023 11:26
1 question, 3 AIs

Sure. Here are the five autopilot modes you mentioned, along with their descriptions:

  • LNAV: Lateral Navigation mode. This mode allows the autopilot to follow a pre-programmed flight path. The flight path is typically defined by a series of waypoints, which are points on the ground that the aircraft must pass over.

  • VNAV: Vertical Navigation mode. This mode allows the autopilot to maintain a pre-programmed vertical flight path. The vertical flight path is typically defined by a target altitude or a rate of climb/descent.

  • HDG SEL: Heading Select mode. This mode allows the autopilot to maintain a specific heading. The heading is typically entered by the pilot into the autopilot system.

  • ALT HOLD: Altitude Hold mode. This mode allows the autopilot to maintain a specific altitude. The altitude is typically entered by the pilot into the autopilot system.

  • V/S: Vertical Speed mode. This mode allows the autopilot to maintain a specific vertical speed. The vertical speed is typically entered by the pilot in

@ruilvo
ruilvo / table.tex
Last active June 7, 2023 10:54
LaTeX table that looks like what I want
% -------------
% | x | x |
% |----------------------|
% | x | x | x |
% |----------------------|
% | x | x | x |
% |----------------------|
% | x | x | x |
% |----------------------|
% | | x | x | x |
@ruilvo
ruilvo / chatgpt_rust_enums.md
Last active April 10, 2023 13:31
ChatGPT: Rust enums

Rust Enums and Option

You:

Explain Rust enums. Explain how Option works.

ChatGPT:

Rust Enums

In Rust, an enum (short for "enumeration") is a custom data type that allows you to define a type by enumerating its possible variants. Each variant can have associated data or not.

@ruilvo
ruilvo / chatgpt_cpp_types_of_values.md
Created April 9, 2023 21:16
ChatGPT: C++ types of values

C++ Value Categorization.

You:

Explain the difference between xvalues, rvalues, lvalues, and prvalues in C++

ChatGPT:

In C++, values are categorized based on the expressions that generate them. There are four types of values in C++:

  1. lvalues: An lvalue refers to an object that has a persistent identity and a memory address. An lvalue can appear on the left-hand side (LHS) of an assignment statement, meaning it can be assigned a value. Examples of lvalues include variables, arrays, and references.
@ruilvo
ruilvo / apachevserver.conf
Created April 5, 2023 11:55
Moodle and Docker problems
<VirtualHost *:443>
# Exec group
SuexecUserGroup "#1000" "#1000"
# Server name
ServerName moodle.mydomain.example
# Errors and logs
ErrorLog /var/log/virtualmin/mydomain.example_error_log
CustomLog /var/log/virtualmin/mydomain.example_access_log combined