Skip to content

Instantly share code, notes, and snippets.

View lssimoes's full-sized avatar

Lucas Silva Simões lssimoes

View GitHub Profile
@tomasruud
tomasruud / spotify-fullscreen-fix.md
Last active July 5, 2023 15:26
Fixing Spotify stuck in full screen on Linux

For apt version:

sed -i '/app.window/d' $HOME/.config/spotify/prefs

For Snap version:

sed -i '/app.window/d' $HOME/snap/spotify/current/.config/spotify/prefs
@Miladiouss
Miladiouss / Select_CIFAR10_Classes.py
Last active October 27, 2023 03:41
Create PyTorch datasets and dataset loaders for a subset of CIFAR10 classes.
import torchvision
import torchvision.transforms as transforms
from torchvision.datasets import CIFAR10
from torch.utils.data import Dataset, DataLoader
import numpy as np
# Transformations
RC = transforms.RandomCrop(32, padding=4)
RHF = transforms.RandomHorizontalFlip()
RVF = transforms.RandomVerticalFlip()
@gabrielsimoes
gabrielsimoes / vadown.sh
Last active December 30, 2015 00:27
Download homiliae from vatican and save as html
#!/bin/bash
link=$1
if [[ ! -n $1 ]]
then
echo "ERROR:no link" >&2
exit 1
fi
#htmlheader="<?xml version=\"1.0\" encoding=\"utf-8\"?>
@tboggs
tboggs / dirichlet_plots.png
Last active February 13, 2024 03:25
A script to generate contour plots of Dirichlet distributions
dirichlet_plots.png
@gizmaa
gizmaa / Plot_Examples.md
Last active April 12, 2024 14:18
Various Julia plotting examples using PyPlot
@chrisroos
chrisroos / gpg-import-and-export-instructions.md
Created September 9, 2011 10:49
Instructions for exporting/importing (backup/restore) GPG keys

Every so often I have to restore my gpg keys and I'm never sure how best to do it. So, I've spent some time playing around with the various ways to export/import (backup/restore) keys.

Method 1

Backup the public and secret keyrings and trust database

cp ~/.gnupg/pubring.gpg /path/to/backups/
cp ~/.gnupg/secring.gpg /path/to/backups/
cp ~/.gnupg/trustdb.gpg /path/to/backups/

or, instead of backing up trustdb...