Skip to content

Instantly share code, notes, and snippets.

View rafecolton's full-sized avatar
👨‍💻
Infrastructure @ Expensify

Rafe Colton rafecolton

👨‍💻
Infrastructure @ Expensify
View GitHub Profile
@rafecolton
rafecolton / Convert .mov or .MP4 to .gif.md
Created September 6, 2023 20:04 — 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.

@rafecolton
rafecolton / loadAllComments.js
Created July 16, 2020 00:28 — forked from justinpersaud/gist:6993832c26c2359fba1ac6245ddb77c4
Expand all hidden github comments on issues
function loadAllComments() {
let needRescheduling = false;
const buttons = Array.from(document.querySelectorAll('button'));
buttons.forEach((button) => {
if (button.classList.contains('ajax-pagination-btn')) {
if(!button.hasAttribute('disabled') && button.innerText === 'Load more…') {
console.log("found", button);
needRescheduling = true;
button.dispatchEvent(new MouseEvent('click', {
bubbles: true,
@rafecolton
rafecolton / route53-iam-caddy.json
Created November 9, 2017 21:00
Route53 IAM Policy for Caddy Verification
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "Stmt1510258901000",
"Effect": "Allow",
"Action": [
"route53:ChangeResourceRecordSets",
"route53:GetHostedZone",
"route53:ListResourceRecordSets"
@rafecolton
rafecolton / yq
Created October 4, 2017 13:44 — forked from earonesty/yq
#!/bin/env python
import yaml
import sys
import json
import argparse
from subprocess import Popen, PIPE
import argparse
import os
@rafecolton
rafecolton / brew-go-get.bash
Created August 13, 2017 19:43
brew-go-get
#!/bin/bash
# https://blog.filippo.io/cleaning-up-my-gopath-with-homebrew/
set -euo pipefail
if [[ $# -lt 1 ]] || [[ "$1" =~ -h|--help ]] ; then
echo "Usage: brew-go-get github.com/foo/bar ..."
exit 1
fi
@rafecolton
rafecolton / multipart_upload.go
Last active September 18, 2015 16:46 — forked from mattetti/multipart_upload.go
Example of doing a multipart upload in Go (golang)
package main
import (
"bytes"
"fmt"
"io"
"log"
"mime/multipart"
"net/http"
"os"
@rafecolton
rafecolton / install-redis-from-source.sh
Last active August 29, 2015 13:56
Install redis from source
#!/usr/bin/env bash
# to use, run the following command:
# bash <(curl -s https://gist.github.com/rafecolton/8982564/raw/7e1ddc069e57810c4f9ee5ca109244b0b5cc0270/install-redis.sh)
cd "$HOME"
curl -s -O http://download.redis.io/redis-stable.tar.gz
tar -xzf redis-stable.tar.gz
cd redis-stable
make
@rafecolton
rafecolton / .vimrc
Created February 4, 2014 04:33
Show hidden files with NERDTree
let NERDTreeShowHidden=1
# This is a short collection of tools that are useful for managing your
# known_hosts file. In this case, I'm using the '-f' flag to specify the
# global known_hosts file because I'll be adding many deploy users on this
# system. Simply omit the -f flag to operate on ~/.ssh/known_hosts
# Add entry for host
ssh-keyscan -H github.com > /etc/ssh/ssh_known_hosts
# Scan known hosts
ssh-keygen -f /etc/ssh/ssh_known_hosts -H -F github.com
" Vim indent file
" Language: Yaml
" Author: Ian Young
" Get it bundled for pathogen: https://github.com/avakhov/vim-yaml
if exists("b:did_indent")
finish
endif
"runtime! indent/ruby.vim
"unlet! b:did_indent