Skip to content

Instantly share code, notes, and snippets.

@NoMan2000
NoMan2000 / openssl.md
Last active March 14, 2024 17:31 — forked from zhiguangwang/openssl.md
Common OpenSSL Commands with Keys and Certificates

Common OpenSSL Commands with Keys and Certificates

SSL Info

Generate RSA private key with certificate in a single command

openssl req -x509 -newkey rsa:4096 -sha256 -keyout example.key -out example.crt -subj "/CN=example.com" -days 3650 -passout pass:foobar

Generate Certificate Signing Request (CSR) from private key with passphrase

openssl x509 -x509toreq -in example.crt -out example.csr -signkey example.key -passin pass:foobar

@romuloctba
romuloctba / Dockerfile
Created November 29, 2018 01:51
Photoshop on Docker
# docker run -it \
# -v /tmp/.X11-unix:/tmp/.X11-unix \
# -v $HOME:/workspace \
# -e DISPLAY=$DISPLAY \
# --privileged
# photoshop
#
FROM jess/wine
MAINTAINER Jonathan Gautheron <jgautheron@neverblend.in>
@codediodeio
codediodeio / config.js
Last active July 23, 2024 02:55
Snippets from the Firestore Data Modeling Course
import * as firebase from 'firebase/app';
import 'firebase/firestore';
var firebaseConfig = {
// your firebase credentials
};
// Initialize Firebase
firebase.initializeApp(firebaseConfig);
@joelotz
joelotz / cue2labels.py
Last active May 1, 2024 21:51
Convert a music .cue file into a label file. This module will accept an optional string attribute that specifies the input .cue file. If this file is not provided in the call then file-select box will be presented to the user. Output is a .txt file of labels that can be input into Audacity.
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Convert a music .cue file into a label file.
This module will accept an optional string attribute that specifies the input
.cue file. If this file is not provided in the call then file-select box will
be presented to the user. Output is a .txt file of labels that can be input
into Audacity.
Examples:
@palumbo
palumbo / Download Images.gs
Created June 9, 2022 23:55
The code I used to download images into a Google Sheets cell or download images into a Google Drive folder.
function insertImage() {
let sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
let lastRow = sheet.getLastRow();
for (let i = 0; i < lastRow-1; i++) {
let url = sheet.getRange(2+i,1).getValue();
let image = SpreadsheetApp.newCellImage().setSourceUrl(url);
sheet.getRange(2+i,2).setValue(image);
}
@rhlobo
rhlobo / chat_md_format.py
Created February 19, 2024 03:14
Creates an markdown file from an Copilot Chat JSON
# You can export a Copilot Chat session in Visual Studio Code
# to a JSON file via `Ctrl+Shift+P | Chat: Export Session...`
# or by choosing `View > Command Palette | Chat: Export Session...`
# Inspired by https://github.com/Marijn-Bergman/copilot-chat-export-formatter
import sys
import json