Skip to content

Instantly share code, notes, and snippets.

View mtrimarchi's full-sized avatar
🍣
Sushi driven networking

Manuele Trimarchi mtrimarchi

🍣
Sushi driven networking
View GitHub Profile
@mtrimarchi
mtrimarchi / How_to_enable_Screen_Sharing_on_Macs_via_Terminal.md
Created December 29, 2020 15:19
How to enable Screen Sharing on Macs via Terminal

Follow these steps to enable Screen Sharing via Terminal.

  1. Navigate to Applications | Utilities and launch Terminal. If you're working from a keyboard only, press Command+Space Bar to launch Spotlight, and then enter Terminal in the search box to launch the app.

  2. Enter the following command into Terminal and press Enter to execute it. You will be prompted to provide admin credentials prior to processing the command.

sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate -configure -access -off -restart -agent -privs -all -allowAccessFor -allUsers

The command above will work most of the time, as it uses the kickstart method of enabling remote management, which in turn enables Screen Sharing as well for all users of the device. This isn't the most secure method and it's not recommended to be used like this for long periods of time due to the potential security risks of unauthorized access, but it should serve you well as a temporary workaround for the pr

@mtrimarchi
mtrimarchi / cheatsheet.md
Created September 17, 2023 10:26
VyOS personal cheatsheet

Find private ASN range

show ip bgp regexp "[^1-9]{1}(6451[2-9]|645[2-9][0-9]|64[6-9][0-9][0-9]|65[0-4][0-9][0-9]|655[0-2][0-9]|6553[0-5])"

@mtrimarchi
mtrimarchi / start_1.17.22.sh
Created March 19, 2024 07:33
Solana RPC conf for 1.17.22
#!/bin/bash
sudo cpupower frequency-set -g performance
export RUST_LOG=solana=info,solana_validator=info,solana_metrics::metrics=error,solana_accounts_db::accounts_db=error,solana_streamer::streamer=warn,solana_runtime::bank=error
exec /home/solana/solana_binaries/solana-release-v1.17.22/bin/solana-validator \
--identity /var/solana/data/config/validator-keypair.json \
--known-validator 7Np41oeYqPefeNQEHSv1UDhYrehxin3NStELsSKCT4K2 \
--known-validator GdnSyH3YtwcxFvQrVVJMm1JhTS4QVX7MFsX56uJLUfiZ \
@mtrimarchi
mtrimarchi / Code.gs
Created November 7, 2024 22:57
Get quote data from justETF
function GETQUOTEDATA(isin, dataPoint) {
if (!isin) {
return "Error: ISIN required";
}
const url = "https://www.justetf.com/api/etfs/" + isin + "/quote?currency=EUR&locale=it";
try {
const response = UrlFetchApp.fetch(url);
const data = JSON.parse(response.getContentText());