Skip to content

Instantly share code, notes, and snippets.

@woblerr
woblerr / Convert .mov or .MP4 to .gif.md
Created December 18, 2023 14:01 — forked from SheldonWangRJT/Convert .mov or .MP4 to .gif.md
Convert Movie(.mov) file to Gif(.gif) file in one command line in Mac Terminal

This notes is written by Sheldon. You can find me with #iOSBySheldon in Github, Youtube, Facebook, etc.

Need

Convert .mov/.MP4 to .gif

Reason

As a developer, I feel better to upload a short video when I create the pull request to show other viewers what I did in this PR. I tried .mov format directly got after finishing recording screen using Quicktime, however, gif offers preview in most web pages, and has smaller file size.

This is not limited to developer, anyone has this need can use this method to convert the files.

@woblerr
woblerr / create-certs.sh
Created March 5, 2023 17:51 — forked from sethvargo/create-certs.sh
Use openssl to create an x509 self-signed certificate authority (CA), certificate signing request (CSR), and resulting private key with IP SAN and DNS SAN
# Define where to store the generated certs and metadata.
DIR="$(pwd)/tls"
# Optional: Ensure the target directory exists and is empty.
rm -rf "${DIR}"
mkdir -p "${DIR}"
# Create the openssl configuration file. This is used for both generating
# the certificate as well as for specifying the extensions. It aims in favor
# of automation, so the DN is encoding and not prompted.
@woblerr
woblerr / bash_strict_mode.md
Created July 15, 2022 09:17 — forked from vncsna/bash_strict_mode.md
set -e, -u, -o, -x pipefail explanation

set -e, -u, -o, -x pipefail

The set lines

  • These lines deliberately cause your script to fail. Wait, what? Believe me, this is a good thing.
  • With these settings, certain common errors will cause the script to immediately fail, explicitly and loudly. Otherwise, you can get hidden bugs that are discovered only when they blow up in production.
  • set -euxo pipefail is short for:
set -e
set -u
@woblerr
woblerr / shell_file_test_operators.md
Created March 17, 2020 08:01
Shell file test operators

Shell file test operators

Usage

FILE=/etc/passwd

if test -f "$FILE"; then
    echo "$FILE exist"
fi
@woblerr
woblerr / README.md
Created December 12, 2019 14:01
Docker containers logs clearing script

Docker containers logs clearing script

chmod +x ./clear_docker_container_logs.sh

Usage

Usage: ../clear_docker_container_logs.sh [-c ""]
@woblerr
woblerr / useful_docker_commands.md
Created November 8, 2019 15:21
Useful docker commands

Removing intermediate images left over from multiple builds

docker rmi $(docker images -a --filter=dangling=true -q)

Removing stopped containers

docker rm $(docker ps --filter=status=exited --filter=status=created -q)
@woblerr
woblerr / useful_git_commands.md
Last active June 23, 2021 07:32
Useful GIT commands

Reset origin to commit

git log
git reset --hard <commit-hash>
git push --force origin master