Skip to content

Instantly share code, notes, and snippets.

View alexrios's full-sized avatar
🦎
Zigging around

Alex Rios alexrios

🦎
Zigging around
View GitHub Profile
wget -P ~/.local/share/fonts https://github.com/ryanoasis/nerd-fonts/releases/download/v3.0.2/JetBrainsMono.zip \
&& cd ~/.local/share/fonts \
&& unzip JetBrainsMono.zip \
&& rm JetBrainsMono.zip \
&& fc-cache -fv
# Run with elevated privileges
# If you have Connect Wise Control installed, remove it. IT organizations are likely to install it (or similar tool) if they feel the need for Netskope clients.
# RE: https://saputra.org/threads/remove-screenconnect-or-connectwise-control-from-windows-mac-linux.45/
function remove_cswincom() {
thumbprint=$(ls /Library/LaunchAgents/connectwisecontrol-* | head -1 | awk -F- '{print $2}')
# Stop the ConnectWiseControl Client service
launchctl unload /Library/LaunchAgents/connectwisecontrol-${thumbprint}-onlogin.plist
# Delete the service definitions
rm -f /Library/LaunchAgents/connectwisecontrol-${thumbprint}-*.plist
@alexrios
alexrios / install_flipt.sh
Created January 2, 2024 20:41
Installing flipt from releases
#!/bin/bash
# Set default values if not already set
: ${FLIPT_VERSION:="1.34.0"}
: ${ARCH:="linux_x86_64"}
# Check if the script is running as root (sudo)
if [ "$(id -u)" != "0" ]; then
echo "This script must be run as root. Please use sudo."
exit 1
@alexrios
alexrios / shell.nix
Created December 29, 2023 19:29
nix shell for OpenAI Whisper
{ pkgs ? import <nixpkgs> {}} :
pkgs.mkShell {
buildInputs = [
pkgs.python3
pkgs.poetry
pkgs.python311Packages.torch
pkgs.ffmpeg_5-full
pkgs.openai-whisper
];
}
@alexrios
alexrios / text-generation-webui.txt
Created July 28, 2023 02:04
Instructions to use any LLM model locally
# this tutorial assumes conda and git are both installed on your computer
conda create -n tg python=3.10.9
conda activate tg
pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu117
git clone https://github.com/oobabooga/text-generation-webui.git
cd text-generation-webui
pip install -r requirements.txt
# GPU only:
# this tutorial assumes conda and git are both installed on your computer
conda create -n tg python=3.10.9
conda activate tg
pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu117
git clone https://github.com/oobabooga/text-generation-webui.git
cd text-generation-webui
pip install -r requirements.txt
# GPU only:
How We Do Code Review
Lukas Spieß
September 22nd, 2017
Visual Studio Mobile Center is now Visual Studio App Center. Learn more here. The Mobile Center team is a diverse mix of engineers, product managers, and UI/UX designers with varying professional backgrounds, experience, and countries of origin. Our team has people from over 10 countries working across 8 time zones. Some are fresh out of college, while others have been in the industry for more than 20 years, and we all came in with our own understanding and definition of “code review.”
We spend a significant part of our day doing code review in GitHub and Visual Studio Team Services, so we welcome anything that makes it faster, easier, and better. After pinpointing several common pain points, we established and widely circulated a common set of code review principles for submitters and reviewers.
@alexrios
alexrios / main.go
Created October 2, 2022 21:19
TSE Presidenciaveis 2022 - Go version
package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"time"
)
@alexrios
alexrios / redMetricsMiddleware.go
Created July 28, 2022 20:35
Tally based RED metrics middleware
package middleware
import (
"net/http"
"github.com/uber-go/tally/v4"
)
type statusCodeAwareWriter struct {
http.ResponseWriter
@alexrios
alexrios / goimports.sh
Created July 12, 2022 13:24
goimports excluding folders
DIRS=$(go list -f {{.Dir}} ./... | grep -vE 'docs|proto|gen')
for d in $DIRS; do goimports -w $d/*.go; done