Skip to content

Instantly share code, notes, and snippets.

View agusgonzaleznic's full-sized avatar
🎯

Agustin Gonzalez Nicolini agusgonzaleznic

🎯
View GitHub Profile
@Jakuje
Jakuje / README.md
Last active December 1, 2023 17:36
OpenSC test Sign, Verify, Encipher and Decipher from commandline with OpenSSL CLI
export PIN=111111
export SIGN_KEY=11
export ENC_KEY=55

Sign/Verify using private key/certificate

  • Create a data to sign

    echo "data to sign (max 100 bytes)" > data
    
@dwallraff
dwallraff / loopback_filesystem.sh
Last active July 6, 2024 14:53
Create and mount a loopback filesystem
#!/usr/bin/env bash
## Loopback Filesystem
# This script will create and mount a loopback filesystem
# Useful if you need to limit director(ies) by size
# but only have one volume
# This script needs to be run with sudo
LO_FILESYSTEM_NAME=my_loopback
LO_FILESYSTEM_MB_SIZE=5
@vasansr
vasansr / aws_create_users_ubuntu.sh
Last active November 25, 2023 04:11
AWS User Data Script to create users when launching an Ubuntu server EC2 instance
#!/bin/bash
#
# Initial script to create users when launching an Ubuntu server EC2 instance
#
declare -A USERKEY
#
# Create one entry for every user who needs access. Be sure to change the key to their
@troyfontaine
troyfontaine / 1-setup.md
Last active July 23, 2024 23:25
Signing your Git Commits on MacOS

Methods of Signing Git Commits on MacOS

Last updated March 13, 2024

This Gist explains how to sign commits using gpg in a step-by-step fashion. Previously, krypt.co was heavily mentioned, but I've only recently learned they were acquired by Akamai and no longer update their previous free products. Those mentions have been removed.

Additionally, 1Password now supports signing Git commits with SSH keys and makes it pretty easy-plus you can easily configure Git Tower to use it for both signing and ssh.

For using a GUI-based GIT tool such as Tower or Github Desktop, follow the steps here for signing your commits with GPG.

@mcattarinussi
mcattarinussi / gpg-ssh-setup.md
Last active July 25, 2024 03:53
A setup guide to use a personal gpg key for ssh authentication

GPG - SSH setup

Generating the master key

Here we create the master key. We want only Certify capability: we use the master key only to create the subkeys, Sign - Encrypt - Authenticate capabilities will be assigned to the subkeys.

Run the following command to start the master key generation process. Select the set your own capabilities creation process (type 8)

  ▶ gpg --full-generate-key --expert

gpg (GnuPG) 2.2.9; Copyright (C) 2018 Free Software Foundation, Inc.

@JamoCA
JamoCA / NordVPN-Server-IP-List.txt
Last active July 8, 2024 18:32
NordVPN Server IP List; 2,590 IPs; 2020-02-04T15:31:55Z
103.120.66.35
103.120.66.51
103.227.255.101
103.60.9.27
103.60.9.75
103.62.49.193
103.62.49.195
103.62.49.198
103.62.49.203
103.62.49.205
@MickaelBaye
MickaelBaye / template.sh
Created May 21, 2019 14:49
Template for Bash scripts
#!/bin/bash
## DESCRIPTION:
## AUTHOR: $USER_FULLNAME
declare -r SCRIPT_NAME=$(basename "$BASH_SOURCE" .sh)
## exit the shell(default status code: 1) after printing the message to stderr
bail() {
@guitarrapc
guitarrapc / _get_github_oidc_thumbprint.sh
Last active May 26, 2024 18:45
Get Thumbprint of GitHub OIDC, updated on 2022/01/13.
$ openssl s_client -servername token.actions.githubusercontent.com -showcerts -connect token.actions.githubusercontent.com:443 < /dev/null 2>/dev/null | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' | sed "0,/-END CERTIFICATE-/d" > certificate.crt
$ openssl x509 -in certificate.crt -fingerprint -noout | cut -f2 -d'=' | tr -d ':' | tr '[:upper:]' '[:lower:]'
6938fd4d98bab03faadb97b34396831e3780aea1