Skip to content

Instantly share code, notes, and snippets.

View JucaRei's full-sized avatar
:electron:
Focusing

JucaRei

:electron:
Focusing
View GitHub Profile
@JucaRei
JucaRei / nixos-install.sh
Created February 3, 2024 04:13 — forked from kanashimia/nixos-install.sh
nixos unstable flake installation from nixos 20.09
#!/bin/sh
set -x
DEVICE=/dev/vda
SWAP_SIZE=2GiB
URI=github:kanashimia/nixos/module-refactor#personal-server
TYPE=legacy
trap "swapoff $DEVICE; umount /mnt/boot; umount /mnt; exit" INT
#!/usr/bin/env sh
# ____ _ _
#| __ ) _ _| |_| |_ __ _ _ __ ___
#| _ \| | | | __| __/ _` | '__/ __|
#| |_) | |_| | |_| || (_| | | \__ \
#|____/ \__,_|\__|\__\__,_|_| |___/
# _ _
# / \ _ __ ___| |__
@JucaRei
JucaRei / Readme.md
Created January 29, 2024 00:26 — forked from WhittlesJr/Readme.md
NixOS: PCI Passthrough

PCI Passthrough

Warning: unfinished (but successfull!)

I did PCI passthrough on Archlinux and Debian with the old PCI-stub method (this was pre-4.0 era). And later I did PCI passthrough on the 4.1+ kernels on Arch and Ubuntu (16.10 I think?).

This is my attempt at doing the same on Nixos.

Requirements

@JucaRei
JucaRei / README.md
Created January 12, 2024 02:23 — forked from matthewpi/README.md
Nix on Fedora

NixOS on Fedora

Please note that these instructions are not offically supported or condoned by Nix and are not guaranteed to always work, but from my testing everything seems to work perfectly fine.

These steps may not be required if NixOS/nix#2374 is resolved.

SELinux

These commands are required for both Fedora Workstation and Fedora Silverblue

@JucaRei
JucaRei / smb.conf
Created October 7, 2023 04:15 — forked from mafredri/smb.conf
Samba config for Open PS2 Loader (PlayStation 2)
# This setup works pretty well for OPL with a network link that travels through
# two UniFi switches and connects to a Samba server running inside Docker. The
# host OS is Debian with a ZFS filesystem and the container OS is also Debian.
# Latest Samba (4.11+).
[global]
# ======================
# General Samba settings
# ======================
log level = 1
@JucaRei
JucaRei / install-osx-high-sierra-command-line.sh
Created September 9, 2023 02:58 — forked from peacefixation/install-osx-high-sierra-command-line.sh
Install OS X High Sierra without converting to APFS file system
# create a USB installer
# https://support.apple.com/en-au/HT201372
Download the OS X High Sierra installer via the App Store, it will be installed into the /Applications directory
If it opens automatically, close it
Insert a USB stick (8GB+)
Run the following command where MyVolume is the name of the USB volume:
sudo /Applications/Install\ macOS\ High\ Sierra.app/Contents/Resources/createinstallmedia --volume /Volumes/MyVolume
# boot the USB installer
@JucaRei
JucaRei / mpc-fade
Created September 8, 2023 20:24 — forked from Pablo1107/mpc-fade
A script to fade volume when toggling MPD via mpc based on lcpz's script.
#!/bin/sh
# A script to fade volume when toggling MPD via mpc
mpc=`which mpc`
SINKAPP="mpd"
SECS=2.0
sinks=$(pactl list sink-inputs)

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@JucaRei
JucaRei / Search my gists.md
Created August 27, 2023 21:04 — forked from santisbon/Search my gists.md
How to #search gists

Enter this in the search box along with your search terms:

Get all gists from the user santisbon.
user:santisbon

Find all gists with a .yml extension.
extension:yml

Find all gists with HTML files.
language:html

@JucaRei
JucaRei / sudo with no password - alpine.md
Created August 2, 2023 03:19 — forked from arvati/sudo with no password - alpine.md
Alpine with sudo and no password

Alpine with sudo and no password

su root
addgroup -S sudo
addgroup manager sudo
getent group sudo
apk update
apk upgrade
apk --no-cache add openssh nano sudo tzdata
visudo /etc/sudoers.d/nopasswd