Skip to content

Instantly share code, notes, and snippets.

@tuansoibk
tuansoibk / cryptography-file-formats.md
Last active May 6, 2024 11:56
Cryptography material conversion and verification commands
  1. Introduction
  2. Standards
  3. Common combinations
  4. Conversion
  5. Verification/Inspection
  6. Tips for recognising

Introduction

It happens that there are many standards for storing cryptography materials (key, certificate, ...) and it isn't always obvious to know which standard is used by just looking at file name extension or file content. There are bunch of questions on stackoverflow asking about how to convert from PEM to PKCS#8 or PKCS#12, while many tried to answer the questions, those answers may not help because the correct answer depends on the content inside the PEM file. That is, a PEM file can contain many different things, such as an X509 certificate, a PKCS#1 or PKCS#8 private key. The worst-case scenario is that someone just store a non-PEM content in "something.pem" file.

@iambryancs
iambryancs / get-argocd-default-password.md
Created October 3, 2023 03:05
Get ArgoCD default admin password

Get ArgoCD default admin password

To get ArgoCD default admin password after installation, run:

kubectl -n argocd get secret argocd-initial-admin-secret \
          -o jsonpath="{.data.password}" | base64 -d; echo

The default admin user is admin.

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?

@smontanaro
smontanaro / dusort.sh
Created November 7, 2022 11:01
I got this du postprocessing script from "the net" in the dark ages (probably from Usenet in the 80s or 90s). I have no idea who the original author was. I've never modified it **at all**. It has always just worked.
#!/bin/sh
#
# sort a "du" listing by directory size
# usage: du | dusort
FILES=
TFORM=0
while test $# -ge 1; do
case $1 in
-t) TFORM=1; ;;
@mjm918
mjm918 / client.py
Last active May 6, 2024 11:55
Python Encryption Decryption (Socket Chat,RSA Encryption/Decryption,AES.MODE_CTR encryption.IDEA.MODE_CTR Encryption/Decryption)
import time
import socket
import threading
import hashlib
import itertools
import sys
from Crypto import Random
from Crypto.PublicKey import RSA
from CryptoPlus.Cipher import IDEA
@rikukissa
rikukissa / POST.md
Last active May 6, 2024 11:52
React Hook prompting the user to "Add to homescreen" 🏠 #PWA #React
title slug createdAt language preview
React Hook prompting the user to "Add to homescreen"
react-hook-prompting-the-user-to-add
2018-11-29T20:35:02Z
en
Simple React Hook for showing the user a custom "Add to homescreen" prompt.

React Hook for showing custom "Add to homescreen" prompt

@kconner
kconner / macOS Internals.md
Last active May 6, 2024 11:47
macOS Internals

macOS Internals

Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.

Starting Points

How to use this gist

You've got two main options:

@jam1garner
jam1garner / switch-gdb-cheatsheet.md
Last active May 6, 2024 11:46
GDB for Switch Modding Cheatsheet/Tutorial

This is a mini-tutorial of sorts for getting started with gdb on the Switch, with the target audience being people who want to mod and/or reverse games, with no prerequisite knowledge of gdb. The goal will be to walk you through some of the basic workflows needed to use a debugger on the Switch, while being brief enough for skimming for when you forget things.

If some part is unclear, your OS doesn't have install instructions, or you feel part of your workflow should be added here, feel free to comment any additions.

(If you only need a quick reference Jump to the Appendix)

Installing GDB

First off you'll need a version of GDB compatible with aarch64. This can be obtained via either a distribution of

class Logger {
sucesso(message) {
console.log(`SUCESSO: ${message}`)
}
error(message) {
console.error(`ERROR: ${message}`)
}
}
@rutcreate
rutcreate / README.md
Last active May 6, 2024 11:45
Install Python 3.10.x on Ubuntu 20.04

Prerequisite

sudo apt update
sudo apt install software-properties-common -y

Add custom APT repository