Skip to content

Instantly share code, notes, and snippets.

View nsouto's full-sized avatar

Nuno Souto nsouto

View GitHub Profile
@nsouto
nsouto / openpgp-card-guide.md
Created May 24, 2017 22:25
Quick GPG Smartcard Guide

Quick GPG Smartcard Guide

We will generate a master key with only the Certify capability and three subkeys with each of the Sign, Encrypt and Authenticate capabilities. These latter three keys are meant for daily use and will be transferred to an OpenPGP smartcard, which has three corresponding slots. The master private key can then be moved to offline cold storage, or stored on a second smartcard.

We are generating keys on a secure computer instead of on the card, because it allows more flexibility. Ideally this means a machine running Tails or one that is air-gapped and not connected to the internet.

This guide assumes that if you want to sign other peoples keys, then you will require the aforementioned secondary smartcard with your master key stored in its Signature slot, or if you only have one smartcard, then you'll have to fetch the master key out of cold storage. By default, GPG generates a master key with the Certify and

@nsouto
nsouto / v-cloak.md
Created May 24, 2017 22:31 — forked from adamwathan/v-cloak.md
Useful CSS utilities for Vue.js cloaking

Handy helpers for controlling visibility of elements until Vue has compiled.

Use like:

<div v-cloak>
  <h1>
    <span class="v-cloak--inline">Loading...</span> <!-- Only displayed before compiling -->
    <span class="v-cloak--hidden">{{ post.title }}</span> <!-- Hidden until compiling is finished -->
 
@nsouto
nsouto / laravel-log-permissions.md
Last active June 22, 2024 04:35
How to make sure Laravel Logs are created with proper permissions

How to have the Laravel Logs created with open permissions

When using Laravel from the CLI and WEB, usually you'll end up creating the log file from two different users, this can prevent your application from loading correctly in either side.

In order to resolve this you just have to edit the file:

bootstrap/app.php

And right before the end of the file where the line reads:

1. Clone your fork:

git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream

Keybase proof

I hereby claim:

  • I am nsouto on github.
  • I am nsouto (https://keybase.io/nsouto) on keybase.
  • I have a public key ASCtwkBtT8JPrXWeLeoHJIrJG0p8u5lLIDFfCr7YoE4_FQo

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am nsouto on github.
  • I am nsouto (https://keybase.io/nsouto) on keybase.
  • I have a public key ASCof5Nr4mKlNViGclGgHcr3Y68J4zJF3dzJoWnP2NO36wo

To claim this, I am signing this object:

@nsouto
nsouto / cloud-init.sh
Created January 9, 2023 21:30
Cloud Init
#cloud-config
runcmd:
- curl -fsSL https://get.docker.com | sh
- docker pull portainer/portainer-ee:latest
- docker volume create portainer_data
- docker run -d -p 8000:8000 -p 9443:9443 --name portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ee:latest