Skip to content

Instantly share code, notes, and snippets.

View pike00's full-sized avatar

Will Pike pike00

View GitHub Profile
@josepsmartinez
josepsmartinez / ssh-set-permissions.sh
Last active October 3, 2021 15:49
ssh permissions
#!/bin/bash
# Configs
chmod 700 $HOME/.ssh
chmod 644 $HOME/.ssh/authorized_keys
chmod 644 $HOME/.ssh/known_hosts
chmod 644 $HOME/.ssh/config
# Keys
chmod 600 $HOME/.ssh/id_rsa
@brentonmallen1
brentonmallen1 / Dockerfile
Last active February 20, 2024 13:13
Build psycopg2 for AWS Lambda
FROM lambci/lambda:build-python3.7
ENV \
POSTGRES_VER=11.4 \
PSYCOPG_VER=2.8.3 \
PSYCOPY_MAJ_VER=2.8 \
PSYCOPG_VER_PATH=PSYCOPG-2-8 \
PYTHON_VER=3.7
RUN yum install -y wget tar postgresql-devel
esphome:
name: esp32_1
platform: ESP32
board: lolin32
wifi:
ssid: !secret ssid_iot
password: !secret password_iot
manual_ip:
static_ip: 192.168.0.110
@rpalmite
rpalmite / chart-js-temperature-line-chart.markdown
Created June 24, 2018 02:09
Chart.js - Temperature line chart

Chart.js - Temperature line chart

Chart.js line chart with transparent points and custom labels.

A Pen by rozklad on CodePen.

License.

@steven2358
steven2358 / ffmpeg.md
Last active March 14, 2026 04:30
FFmpeg cheat sheet
@crittermike
crittermike / wget.sh
Last active March 12, 2026 20:31
Download an entire website with wget, along with assets.
# One liner
wget --recursive --page-requisites --adjust-extension --span-hosts --convert-links --restrict-file-names=windows --domains yoursite.com --no-parent yoursite.com
# Explained
wget \
--recursive \ # Download the whole site.
--page-requisites \ # Get all assets/elements (CSS/JS/images).
--adjust-extension \ # Save files with .html on the end.
--span-hosts \ # Include necessary assets from offsite as well.
--convert-links \ # Update links to still work in the static version.
# Example ssh config file. Usually located in ~/.ssh/config (user) or /etc/ssh/ssh_config (system)
# This works on both linux and MacOS
# Basic ssh commands converted to ssh/config file format
# Simplest format
# Run with: "ssh blog" => (equivalent to: "ssh ubuntu@example.com" and "ssh -i ~/.ssh/id_rsa -p 22 ubuntu@example.com")
Host blog
@fntlnz
fntlnz / self-signed-certificate-with-custom-ca.md
Last active March 14, 2026 06:53
Self Signed Certificate with Custom Root CA

Create Root CA (Done once)

Last update: Nov 2025.

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

openssl ecparam -genkey -name secp384r1 | openssl ec -aes256 -out rootCA.key
@majal
majal / pdfra
Last active November 12, 2020 20:27 — forked from stefanschmidt/remove-annotations.sh
Remove all annotations from a PDF document
#!/bin/bash
[[ -z "$1" ]] && echo "Please enter a filename. Exiting..."
[[ -z "$1" ]] && exit 1
echo
printf "Stripping annotations from $1... "
pdftk "$1" output "/tmp/$1 - uncompressed.pdf" uncompress
LANG=C sed -n '/^\/Annots/!p' "/tmp/$1 - uncompressed.pdf" > "/tmp/$1 - stripped.pdf"
@bastman
bastman / docker-cleanup-resources.md
Created March 31, 2016 05:55
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm