Skip to content

Instantly share code, notes, and snippets.

View silvae86's full-sized avatar

João Rocha da Silva silvae86

View GitHub Profile
@geosp
geosp / thunderbolt-networking-guide.md
Created March 21, 2025 03:44
Thunderbolt Networking Setup on Linux

Thunderbolt Networking Setup on Linux

This guide documents the steps to enable and configure Thunderbolt networking on your Linux system (e.g., Ubuntu, Proxmox). It covers loading the necessary kernel modules, ensuring persistent interface naming, configuring a fixed IP address, and testing throughput with iperf3. Note that Thunderbolt 3/4 hardware advertises a raw bandwidth of 40 Gbps, but practical throughput is typically lower due to half‑duplex operation, protocol overhead, and system constraints.

Hardware Used in This Guide

This guide was developed and tested with the following hardware:

  • CPU: AMD Ryzen 9 PRO 6950H
    • 8 cores / 16 threads
  • 3.3 GHz base frequency / 4.94 GHz boost

2022 Zephyrus G14 Fedora Silverblue Setup

GPU Naming

Most applications in Linux will report the names of the two GPUs as follows.

  • Dimgrey Cavefish is dGPU
  • Yellow Carp is iGPU

Boot Hotkeys

@abraithwaite
abraithwaite / chill-zoom.sh
Last active December 12, 2024 09:16
Zoom in Systemd Cgroups on Linux. Change the max allocations to fit your workstation.
#!/usr/bin/bash -xe
cat <<EOF > "${HOME}/.config/systemd/user/zoom.slice"
[Slice]
AllowedCPUs=0-4
MemoryHigh=6G
EOF
cat /usr/share/applications/Zoom.desktop | sed -E 's#^(Exec=).*$#Exec=/usr/bin/systemd-run --user --slice=zoom.slice /opt/zoom/ZoomLauncher#' > "${HOME}/.local/share/applications/Zoom.desktop"
@mirismaili
mirismaili / download-pipe-extract.js
Last active February 14, 2024 10:26
Fast download>--pipe-->extract using node.js. For `tar` and `.tar.gz` files
/**
* Download and extract `.tar.gz` file using node.js
*
* Created on 1400/2/7 (2021/4/27).
* @author {@link https://mirismaili.github.io S. Mahdi Mir-Ismaili}
*/
import http from 'http'
import https from 'https'
import tar from 'tar'
@ishan123456789
ishan123456789 / fasterModifiedPinnologger.ts
Last active May 1, 2025 10:16
Wrapper for pino logger to allow multiple arguments to be fitted in. As per original implementation pino logger accepts one argument only to be logged so with these you can have two args successfully logged.
// This implementation uses any for options as the type definitions are not official so this will allow us to use hooks
import pino from "pino";
const hooks = {
logMethod(inputArgs: any, method: any): any {
if (inputArgs.length >= 2) {
const arg1 = inputArgs.shift();
const arg2 = inputArgs.shift();
return method.apply(this, [arg2, arg1, ...inputArgs]);
}
@silvae86
silvae86 / setup.md
Created April 10, 2020 00:41 — forked from Yatoom/setup.md
Thinkfan configuration

Thinkfan setup

Note: I configured this thinkfan setup for my old Thinkpad w520 on Ubuntu 17.10.

1. Install necessary programs

Install lm-sensors and thinkfan.

sudo apt-get install lm-sensors thinkfan
@yatsu
yatsu / numpy-openblas-macos-pip.sh
Created April 5, 2020 10:31
Install numpy with enabling openblas using pip on macOS
# Setup HomeBrew: https://brew.sh/
brew install openblas
pip download --no-binary :all: --no-deps numpy
unzip numpy-1.18.2.zip # (you may have newer version)
cd numpy-1.18.2
cat > site.cfg <<EOF
[openblas]
libraries = openblas
library_dirs = $(brew --prefix openblas)/lib
@DucNgn
DucNgn / PowerlineForTerminal.md
Last active March 29, 2024 03:28
Powerline style for terminal OSX

Installing and configuring Powerline-style command line tools for developers (OSX)

Intro:

For every developer, terminal is their weapon, so why don't you customize it to become a powerful, and a beautiful weapon?

Powerline style refers to a terminal style that helps developer to keep track of their workflow easily, allows them to have perfect visual on current directories and new changes. It is also git recognizable, and failure detector that will help your development process becomes more interact and much faster.

In this guideline, I will introduce you with 2 smart shells: Zsh and Fishshell. Both are perfect for the development jobs due to its rich of resources, and user-friendly.

Note:

@dannguyen
dannguyen / schemacrawler-sqlite-macos-howto.md
Last active March 5, 2025 23:27
How to use schemacrawler to generate schema diagrams for SQLite from the commandline (Mac OS)
@silvae86
silvae86 / gist:fa1ebc2f51876a16ff269921d7d96bb4
Created November 22, 2017 13:49 — forked from reidransom/gist:6042016
Auto-starting VirtualBox VMs on OS X

Auto-starting VirtualBox VMs on OS X

After finding a lot of other posts on the topic that didn't work out for me this one did the trick so I'm reposting for my own sense of self preservation.

Link to original article.

Copy the Virtualbox autostart plist template file to your system's LaunchDaemons folder.

sudo cp \

/Applications/VirtualBox.app/Contents/MacOS/org.virtualbox.vboxautostart.plist \