Skip to content

Instantly share code, notes, and snippets.

View dbirks's full-sized avatar
🐏

David Birks dbirks

🐏
View GitHub Profile
@tuansoibk
tuansoibk / cryptography-file-formats.md
Last active April 15, 2024 17:07
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.

@motorailgun
motorailgun / idea.md
Last active November 16, 2023 03:13
Installing Windows and Linux into the same partition

Installing Windows and Linux into the same partition

But WHY?

There was a reddit post about installing Arch on NTFS3 partition. Since Windows and Linux doesn't have directories with same names under the /(C:\), I thought it's possible, and turned out it was actually possible.
If you are not familiar to Linux, for example you've searched on Google "how to dualboot Linux and Windos" or brbrbr... you mustn't try this. This is not practical.

Pre-requirements

  • UEFI system
  • Any Linux live-boot CD/DVD/USB... with Linux kernel newer than 5.15
  • Windows installer USB
@sindresorhus
sindresorhus / esm-package.md
Last active April 25, 2024 08:14
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.
@br3ndonland
br3ndonland / github-actions-notes.md
Last active April 21, 2024 04:25
Getting the Gist of GitHub Actions
@IanColdwater
IanColdwater / twittermute.txt
Last active April 22, 2024 17:26
Here are some terms to mute on Twitter to clean your timeline up a bit.
Mute these words in your settings here: https://twitter.com/settings/muted_keywords
ActivityTweet
generic_activity_highlights
generic_activity_momentsbreaking
RankedOrganicTweet
suggest_activity
suggest_activity_feed
suggest_activity_highlights
suggest_activity_tweet
@dennybaa
dennybaa / deployment.yml
Created April 12, 2019 05:48 — forked from troyharvey/deployment.yml
Using Kubernetes envFrom for environment variables #k8s #envfrom
# Use envFrom to load Secrets and ConfigMaps into environment variables
apiVersion: apps/v1beta2
kind: Deployment
metadata:
name: mans-not-hot
labels:
app: mans-not-hot
spec:
replicas: 1
@Ryanb58
Ryanb58 / install.md
Last active April 19, 2024 08:38
How to install telnet into a alpine docker container. This is useful when using the celery remote debugger in a dev environment.
>>> docker exec -it CONTAINERID /bin/sh
/app # telnet
/bin/sh: telnet: not found

/app # apk update
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/community/x86_64/APKINDEX.tar.gz
v3.7.0-243-gf26e75a186 [http://dl-cdn.alpinelinux.org/alpine/v3.7/main]
v3.7.0-229-g087f28e29d [http://dl-cdn.alpinelinux.org/alpine/v3.7/community]
@u007
u007 / Caddyfile
Last active December 4, 2018 15:41
Caddy vs traefik
www.example.com:80, www.example.com:443 {
tls self_signed
log /logs access.log
errors visible
proxy /assets nginx:80
proxy / web:3000
redir 301 {
if {>X-Forwarded-Proto} is http
/ https://{host}{uri}
@zacharied
zacharied / alacritty-colors-from-xresources
Created March 21, 2018 06:19
Create an alacritty color config from the current X resources
#!/usr/bin/env bash
# Generates an alacritty color config from currently loaded X resources.
xrdb_grep() {
xrdb -query | grep -E '^\*'"$1"':'
}
color_from_line() {
read -r line && readonly line
echo "${line/\#/0x}" | tr -d '[:space:]' | cut -d ':' -f 2