Skip to content

Instantly share code, notes, and snippets.

@yogeshkumark
yogeshkumark / redis_cheatsheet.bash
Last active May 17, 2021 06:05 — forked from LeCoupa/redis_cheatsheet.bash
Redis Cheatsheet - Basic Commands You Must Know --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
# Redis Cheatsheet
# All the commands you need to know
redis-server /path/redis.conf # start redis with the related configuration file
redis-cli # opens a redis prompt
# Strings.
@yogeshkumark
yogeshkumark / retrieve-cert.sh
Created April 9, 2021 16:48 — forked from stevebakh/retrieve-cert.sh
Bash script using openssl to download website certificate
#!/bin/sh
#
# usage: retrieve-cert.sh remote.host.name [port]
#
REMHOST=$1
REMPORT=${2:-443}
echo |\
openssl s_client -connect ${REMHOST}:${REMPORT} 2>&1 |\
sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p'
@yogeshkumark
yogeshkumark / docker-ps-clean.sh
Created April 9, 2021 16:47 — forked from stevebakh/docker-ps-clean.sh
Formatting of `docker ps` output to strip ports - useful to set as an alias if mapping many ports produces large, wrapped output
docker ps --format "table{{.ID}}\t{{.Names}}\t{{.Image}}\t{{.RunningFor}}\t{{.Status}}"