Skip to content

Instantly share code, notes, and snippets.

View Mr-Guilherme's full-sized avatar

Guilherme Rodrigues Mr-Guilherme

View GitHub Profile
@Mr-Guilherme
Mr-Guilherme / git-branch.md
Created November 1, 2024 13:23
Rename Git Branches

Renaming local and remote

# Names of things - allows you to copy/paste commands
old_name=feature/old
new_name=feature/new
remote=origin

# Rename the local branch to the new name
git branch -m $old_name $new_name

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@Mr-Guilherme
Mr-Guilherme / curl.md
Created March 31, 2022 12:27 — forked from subfuzion/curl.md
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@Mr-Guilherme
Mr-Guilherme / ffmpegBasics.md
Created September 7, 2021 16:01
ffmpeg common commands to cut video.

Cut video with re-encoding

  1. Flag -to HH:MM:SS.MILLISECONDS is for determining the end time of the video to be cut.
  2. Flag -i is input video as path.
  3. The last path is output of video.
foo@bar: ffmpeg -to 00:15:00 -i ./media/file.mp4 ./media/newFile.mp4 
  1. Flag -ss is for determining the start time of the video to be cut.
  2. It is algo possible convert the video format.
@Mr-Guilherme
Mr-Guilherme / nodeLTS&Current.md
Created September 7, 2021 12:54
Commands to install Node LTS or Node Current

Node.js LTS

# For Ubuntu distribution
foo@bar: curl -fsSL http://deb.nodesource.com/setup_lts.x | sudo -E bash -
foo@bar: sudo apt-get install -y nodejs

Node.js Current