Skip to content

Instantly share code, notes, and snippets.

@zsiddiqi
zsiddiqi / dev-setup.md
Created Apr 19, 2021 — forked from AbhieSpeaks/dev-setup.md
Development environment setup: Installing WSL2, Hyper, ZSH, VSCode, OhMyZsh
View dev-setup.md

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

Preview

Requirements

Steps

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

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 / ca.md
Created Feb 25, 2021 — forked from soarez/ca.md
How to setup your own CA with OpenSSL
View ca.md

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 Jan 20, 2021 — forked from afair/tmux.cheat
Tmux Quick Reference & Cheat sheet - 2 column format for less scrolling!
View tmux.cheat
========================================== ==========================================
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 — forked from gereon/gist:3150445
Mac OSX Spotlight Enhancement
View gist:0d268d9e017a1b88c8a0fa9c18aaf3a7

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>
<string>public.c-plus-plus-source</string>
@zsiddiqi
zsiddiqi / cleanrepo.sh
Created May 5, 2020 — forked from legege/cleanrepo.sh
Intelligently clean a Sonatype Nexus repository... keep the last 2 released versions of each "major.minor" artifact
View cleanrepo.sh
#!/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 Nov 24, 2019 — forked from hofmannsven/README.md
Git Cheatsheet
View README.md
@zsiddiqi
zsiddiqi / jenkins-plugins.md
Created Nov 5, 2019 — forked from noqcks/jenkins-plugins.md
How to get a complete plugin list from jenkins (with version)
View jenkins-plugins.md

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 Oct 26, 2019 — forked from brablc/dnsmasq macOS.md
Setup dnsmasq on OS X
View dnsmasq macOS.md

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