Skip to content

Instantly share code, notes, and snippets.

@zsiddiqi
zsiddiqi / openssl-self-signed-san-certificate.md
Created February 25, 2021 23:05 — forked from jdeathe/openssl-self-signed-san-certificate.md
How to generate a self-signed SAN SSL/TLS certificate using openssl

How to generate a self-signed SAN SSL/TLS certificate using openssl

Generating a self-signed certificate is a common taks and the command to generate one with openssl is well known and well documented. Generating a certificate that includes subjectAltName is not so straght forward however. The following example demonstrates how to generate a SAN certificate without making a permanent change to the openssl configuration.

Generate a list of all required DNS names, (Note: CN will be discarded).

$ export SAN="DNS:www.domain.localdomain,DNS:domain.localdomain"
@zsiddiqi
zsiddiqi / dev-setup.md
Created April 19, 2021 15:20 — forked from AbhieSpeaks/dev-setup.md
Development environment setup: Installing WSL2, Hyper, ZSH, VSCode, OhMyZsh

Installing Windows Subsystem for Linux 2, Hyper, ZSH, Node.js and VSCode extensions

Preview

Requirements

Steps

@zsiddiqi
zsiddiqi / ca.md
Created February 25, 2021 22:11 — forked from soarez/ca.md
How to setup your own CA with OpenSSL

How to setup your own CA with OpenSSL

For educational reasons I've decided to create my own CA. Here is what I learned.

First things first

Lets get some context first.

@zsiddiqi
zsiddiqi / tmux.cheat
Created January 20, 2021 20:42 — forked from afair/tmux.cheat
Tmux Quick Reference & Cheat sheet - 2 column format for less scrolling!
========================================== ==========================================
TMUX COMMAND WINDOW (TAB)
========================================== ==========================================
List tmux ls List ^b w
New new -s <session> Create ^b c
Attach att -t <session> Rename ^b , <name>
Rename rename-session -t <old> <new> Last ^b l (lower-L)
Kill kill-session -t <session> Close ^b &
@zsiddiqi
zsiddiqi / gist:0d268d9e017a1b88c8a0fa9c18aaf3a7
Created May 10, 2020 04:31 — forked from gereon/gist:3150445
Mac OSX Spotlight Enhancement

Mac OSX Spotlight Enhancement

Add this to Info.plist in /System/Library/Spotlight/RichText.mdimporter/Contents/ and Spotlight will search for source code files.

<string>public.c-header</string>
<string>public.c-plus-plus-header</string>
<string>public.c-source</string>
<string>public.objective-c-source</string>
public.c-plus-plus-source
@zsiddiqi
zsiddiqi / cleanrepo.sh
Created May 5, 2020 22:02 — forked from legege/cleanrepo.sh
Intelligently clean a Sonatype Nexus repository... keep the last 2 released versions of each "major.minor" artifact
#!/bin/bash
DRY_RUN=1
if [ "$1" != "" ]; then
DRY_RUN="$1"
fi
MAX_VERSION=2
if [ "$2" != "" ]; then
MAX_VERSION="$2"
fi
@zsiddiqi
zsiddiqi / README.md
Created November 24, 2019 20:59 — forked from hofmannsven/README.md
Git Cheatsheet
@zsiddiqi
zsiddiqi / jenkins-plugins.md
Created November 5, 2019 02:26 — forked from noqcks/jenkins-plugins.md
How to get a complete plugin list from jenkins (with version)

I need a way to get a list of plugins so that I can use them with docker jenkins in the format <plugin>: <version>

1. get the jenkins cli.

The jenkins CLI will allow us to interact with our jenkins server from the command line. We can get it with a simple curl call.

curl 'localhost:8080/jnlpJars/jenkins-cli.jar' > jenkins-cli.jar
@zsiddiqi
zsiddiqi / dnsmasq macOS.md
Created October 26, 2019 19:28 — forked from brablc/dnsmasq macOS.md
Setup dnsmasq on OS X

Never touch your local /etc/hosts file in OS X again

To setup your computer to work with *.dev domains, e.g. project.dev, awesome.dev and so on, without having to add to your hosts file each time.

Requirements

Install