Skip to content

Instantly share code, notes, and snippets.

View appleseed-iii's full-sized avatar

Applebee's appleseed-iii

View GitHub Profile
@appleseed-iii
appleseed-iii / Convert .mov or .MP4 to .gif.md
Last active January 21, 2023 13:57 — 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.

First time

  • Download and open xQuartz
  • go to the security tab and ensure 'Allow connections from network clients' is checked
  • quit (it will set $DISPLAY env variable)

On open

  • run xhost + in xQuartz
  • then run speculos alias
@appleseed-iii
appleseed-iii / geth.service
Last active November 1, 2021 21:52
geth service systemctl
# sudo nano /etc/systemd/system/geth.service
# run with:
# sudo systemctl start geth.service
# sudo systemctl status geth.service
# debugging:
sudo runuser -l ubuntu -c "geth --http --http.addr "127.0.0.1" --http.corsdomain "*" --http.port "8545" --syncmode "light" 2>/home/ubuntu/.ethereum/geth.log"
# could also use screen
@appleseed-iii
appleseed-iii / sites-available-default
Created November 1, 2021 18:56
Geth Light node nginx conf
# sudo apt update
# sudo apt install nginx -y
# sudo nano /etc/nginx/sites-available/default
# sudo systemctl stop nginx
# sudo systemctl start nginx
# sudo systemctl status nginx
server {
listen 80;
@appleseed-iii
appleseed-iii / gethcommand.bash
Last active November 1, 2021 18:58
Geth Light node config command
# sudo apt-get install
# sudo apt-get update
# sudo add-apt-repository ppa:ethereum/ethereum
# sudo apt-get update
# sudo apt-get install ethereum
# below command from .ethereum/ directory
geth --http --http.addr "127.0.0.1" --http.corsdomain "*" --http.port "8545" --syncmode "light"