Skip to content

Instantly share code, notes, and snippets.

View pecavalheiro's full-sized avatar

Pedro Cavalheiro pecavalheiro

View GitHub Profile
@pecavalheiro
pecavalheiro / Convert .mov or .MP4 to .gif.md
Created March 8, 2024 13:23 — 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.

@pecavalheiro
pecavalheiro / custom_plan.rb
Last active February 5, 2021 15:10 — forked from jerelmiller/custom_plan.rb
Zeus Test Console
# frozen_string_literal: true
require 'zeus/rails'
class Pry::Pager
def best_available
NullPager.new(pry_instance.output)
end
end
@pecavalheiro
pecavalheiro / rubocop.rb
Created September 20, 2018 12:23 — forked from brandonweiss/rubocop.rb
RuboCop hack for inline-disabling cops
#!/usr/bin/env ruby
def with_captured_stdout
old_stdout = $stdout
$stdout = StringIO.new
yield
$stdout.string
ensure
$stdout = old_stdout
end
@pecavalheiro
pecavalheiro / perfectelementary.bash
Created June 23, 2016 21:03
HowTo Install the perfect Elementary-OS
#Download Elementary OS from here:
#http://sourceforge.net/projects/elementaryos/files/stable/
#First you update your system
sudo apt-get update && sudo apt-get dist-upgrade
#Install Google Chrome
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list'