Skip to content

Instantly share code, notes, and snippets.

View portothree's full-sized avatar
🎯
Focusing

Gustavo Porto portothree

🎯
Focusing
View GitHub Profile
@portothree
portothree / libvirt.nix
Created October 5, 2022 17:21 — forked from sorki/libvirt.nix
libvirt with statically configured bridge
# Module for configuring libvirt with static NixOS networking
# instead of using libvirt managed bridge.
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.virtualisation.libvirtd.networking;
v6Enabled = cfg.ipv6.network != null;
v6PLen = toInt (elemAt (splitString "/" cfg.ipv6.network) 1);
@portothree
portothree / gist:3f134ed38c9c73f5eff7c1d464062cde
Created August 11, 2022 10:55
Adjust webcam brightness with `v4l2-ctl`
$ v4l2-ctl -c brightness=10,contrast=32,saturation=70,hue=0,gamma=110,gain=5,sharpness=6,backlight_compensation=6,exposure_auto=3
@portothree
portothree / shell.nix
Created August 4, 2022 19:04 — forked from Nadrieril/shell.nix
Building LineageOS on NixOS
# I used this shell.nix to build LineageOS 13.0 for my maguro (Samsung Galaxy Nexus GSM) phone
# The build instructions for normal Linuxes are here: https://wiki.lineageos.org/devices/maguro/build
# For NixOS, follow those instructions but skip anything related to installing packages
# Detailed instructions:
# cd into an empty directory of your choice
# copy this file there
# in nix-shell:
# $ repo init -u https://github.com/LineageOS/android.git -b cm-13.0
# $ repo sync
# $ source build/envsetup.sh

Keybase proof

I hereby claim:

  • I am portothree on github.
  • I am gustavop (https://keybase.io/gustavop) on keybase.
  • I have a public key ASDOu1heQYKnxUfMtdXMaLYHk5g3xutUWJzif_4tVrzDFQo

To claim this, I am signing this object:

@portothree
portothree / passgitgpg.md
Created April 29, 2022 13:48 — forked from flbuddymooreiv/passgitgpg.md
Setting up pass on git with a gpg key

The following shell transcript shows how to:

  • Create a GPG key
  • Create a pass database
  • Add git support to the pass database
  • Create a remote git repository
  • Push the pass database to the remote git repository
  • Fetch and display your passwords from another host

It is assumed that the pass package has been installed on both the first and second computers.

@portothree
portothree / README.md
Created March 14, 2022 13:07 — forked from gjreasoner/README.md
Expand Ubuntu 20 Proxmox Disk
# Resize the file system in UI, under VM -> Hardware -> Click on the disk to resize, click "Resize disk" button

# Confirm increase in disk space (1TB in my case)
$ lsblk
NAME                      MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda                         8:0    0    1T  0 disk
├─sda1                      8:1    0    1M  0 part
├─sda2                      8:2    0    1G  0 part /boot
└─sda3                      8:3    0    1T  0 part
@portothree
portothree / nvidia.sh
Created February 5, 2022 13:42 — forked from ironicbadger/nvidia.sh
nvidia linux overclocking for crypto mining
#!/bin/bash
#nvidia-xconfig --allow-empty-initial-configuration --enable-all-gpus --cool-bits=28 --separate-x-screens
nvidia-smi -pm ENABLED
export GPU_FORCE_64BIT_PTR=0
export GPU_MAX_HEAP_SIZE=100
export GPU_USE_SYNC_OBJECTS=1
export GPU_MAX_ALLOC_PERCENT=100
@portothree
portothree / readme.md
Created January 4, 2022 12:40 — forked from 573/readme.md
nix complains "error: cannot auto-call a function that has an argument without a default value ('stdenv')"?

Add on top of default.nix: with import {}; or simply run as nix-build '' (i. e. for nix-build complaining) or rather nix-build -E 'with import {}; callPackage ./default.nix {}' (or even import)

@portothree
portothree / sample-resume.json
Created December 28, 2021 22:57 — forked from ishu3101/sample-resume.json
Sample Resume in JSON Resume Format
{
"basics": {
"name": "Your first and last name",
"label": "",
"picture": "",
"email": "Your email address",
"phone": "A phone number, with any formatting you like. E.g. (555) 555-5555.",
"degree": "",
"website": "Your website URL",
"summary": "A one-sentence to one-paragraph overview text. Do not include any line-breaks.",