Skip to content

Instantly share code, notes, and snippets.

View silvae86's full-sized avatar

João Rocha da Silva silvae86

View GitHub Profile

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 May 8, 2024 08:43
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'
@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 June 30, 2024 18:52
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 \

@davisford
davisford / Setup MongoDB on localhost as Replica Set
Last active May 14, 2024 06:37
Setup MongoDB replica set on local host with only a single primary
Add the `replication` section to the mongod.conf file:
```
$cat /usr/local/etc/mongod.conf
systemLog:
destination: file
path: /usr/local/var/log/mongodb/mongo.log
logAppend: true
storage:
engine: mmapv1
#!/bin/sh
#
# /etc/init.d/ant -- startup script for the ANT 0.1-SNAPSHOT search engine
#
# Written by José Devezas <jld@fe.up.pt>.
#
### BEGIN INIT INFO
# Provides: ant
# Required-Start: $local_fs $network
# Required-Stop: $local_fs $network