Skip to content

Instantly share code, notes, and snippets.

View andreibosco's full-sized avatar

Andrei Bosco B. Torres andreibosco

View GitHub Profile
@andreibosco
andreibosco / raspberry-disable-ipv6.md
Created March 24, 2017 21:06
Raspberry Pi: disable IPv6
@andreibosco
andreibosco / gist:cb8506780d0942a712fc
Created October 21, 2014 17:28
Using GNU Stow to manage your dotfiles

Fonte: http://brandon.invergo.net/news/2012-05-26-using-gnu-stow-to-manage-your-dotfiles.html?round=two

I accidentally stumbled upon something yesterday that I felt like sharing, which fell squarely into the "why the hell didn't I know about this before?" category. In this post, I'll describe how to manage the various configuration files in your GNU/Linux home directory (aka "dotfiles" like .bashrc) using GNU Stow.

The difficulty is that it would be helpful to manage one's configuration files with a version control system like Git, Mercurial or Bazaar, but many/most dotfiles reside at the top-level of your home directory, where it wouldn't be a good idea to initialize a VCS repository. Over time I've come across various programs which aim to manage this for you by keeping all the files in a subdirectory and then installing or linking them into their appropriate places. None of those programs ever really appealed to me. They would require a ton of dependencies (like Ruby and a ton of libraries for it) or t

@andreibosco
andreibosco / ssh-gpg-yubikey-macos.md
Created July 16, 2022 16:27
SSH keys on a Yubikey in a Mac

Based on https://davecoyle.com/tech-notes/ssh-keys-on-a-yubikey-mac/

SSH keys on a Yubikey in a Mac

Software Stuff

  • Install the YubiKey Manager CLI (ykman); alternative installation options can be found here: brew install ykman

  • Install GPG >= 2.1. Version 2.1 simplified the running of gpg-agent. The version isn’t a hard requirement, but it might make your life easier.

@andreibosco
andreibosco / set_env.md
Created May 6, 2021 15:08
Set environment variables from file of key/value pairs
@andreibosco
andreibosco / install_cuda_tensorflow_miniconda_Pop!Os20_04.md
Last active February 4, 2024 07:43
Installing cuda, tensorflow and miniconda on Pop!_OS 20.04

Installing cuda, tensorflow and miniconda on Pop!_OS 20.04

Cuda and Tensorflow

  • Install tensorflow: sudo apt install tensorflow-cuda-latest
  • Install cuda: sudo apt install system76-cuda-latest

Miniconda

@andreibosco
andreibosco / creative-cloud-disable.md
Last active January 3, 2024 02:37
disable creative cloud startup on mac
@andreibosco
andreibosco / powershell-google-tts.PS1
Created March 18, 2021 19:21
Powershell script to generate audio using google text-to-speech service
# Requirements:
# - active google cloud project
# - enable 'Cloud Text-to-Speech API'
# - GOOGLE_APPLICATION_CREDENTIALS defined as an environment variable, pointing to your JSON account key file
# - Google Cloud SDK installed and initialized
# Based on official quickstart example: https://cloud.google.com/text-to-speech/docs/quickstart-protocol
$dialogue = Read-Host -Prompt 'Dialogue text'
$outputName = Read-Host -Prompt 'Output file name (.mp3 extension will be added automatically)'
@andreibosco
andreibosco / tensorman_jupyter.md
Created May 4, 2020 15:54
Launching jupyter from tensorman (Pop!_OS 20.04)

Launching jupyter from tensorman (Pop!_OS 20.04)

Source: pop-os/tensorman#10 (comment)

When launching a container, be sure to supply the port mappings argument to map the port from the container to the host.

tensorman run -p 8888:8888 --gpu --python3 --jupyter  bash

Within the container, you may start the Jupyter notebook with

@andreibosco
andreibosco / yubikey-windows10.md
Last active August 25, 2023 09:19
Setting up Yubikey with SSH and Git on Windows 10 + Powershell
@andreibosco
andreibosco / restore_boot_endeavouros_btrfs.md
Created July 15, 2023 17:10
restore boot - endeavourOS with BTRFS

To restore Linux item to EFI boot list

  • switch into root: sudo su

  • list disks and partitions: fdisk -l

  • find main list filesystem partition and efi partition

  • create mountpoint: mkdir /mnt/arch

  • mount partition (additional argument needed for btrfs): mount -t auto -o subvol=@ /dev/nvme0n1p6 /mnt/arch/ (source: https://forum.endeavouros.com/t/chroot-into-a-btrfs-uefi-system-from-live-media/15986/3)

  • change root into mounted partition: arch-chroot /mnt/arch

  • mount EFI partition: mount -t auto /dev/nvme0n1p2 /efi/