Skip to content

Instantly share code, notes, and snippets.

Avatar
Brewing coffee

Abe Estrada AbeEstrada

Brewing coffee
View GitHub Profile
@AbeEstrada
AbeEstrada / Force_MFA.json
Last active Mar 4, 2020
Allows MFA-Authenticated IAM Users to Manage Their Own Credentials on the My Security Credentials Page
View Force_MFA.json
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AllowViewAccountInfo",
"Effect": "Allow",
"Action": [
"iam:GetAccountPasswordPolicy",
"iam:GetAccountSummary",
"iam:ListVirtualMFADevices"
View gist:804dcb819da6c237d123e4d212892bae
ffmpeg -i in.mov -vcodec h264 -acodec mp2 out.mp4
@AbeEstrada
AbeEstrada / gist:dd5bbc65b4e0f4074703f9bce926a146
Created Oct 22, 2019
Download and merge (concat) video files m3u8
View gist:dd5bbc65b4e0f4074703f9bce926a146
ffmpeg -i "https://<URL>.m3u8" -codec copy video.mp4
View gist:394c5972904cd378ba42f315dd4ec10e
aom, dav1d, freetype, fontconfig, frei0r, gmp, bdw-gc, libffi, libtool, libunistring, guile, libidn2, libtasn1, nettle, p11-kit, libevent, unbound, gnutls, fribidi, glib, lzo, pixman, cairo, gobject-introspection, graphite2, icu4c, harfbuzz, libass, libbluray, libsoxr, libvidstab, libogg, libvorbis, libvpx, opencore-amr, jpeg, libtiff, little-cms2, openjpeg, opus, rav1e, rtmpdump, flac, libsndfile, libsamplerate, rubberband, sdl2, snappy, speex, srt, giflib, webp, leptonica, tesseract, theora, x264, x265, xvid
View gist:557df2d8a5e6708b81c72dcb83f7137d
curl -d '{"page_token":"1234567890","url":"https://url-goes-here.com/","title":"Title goes here"}' -H "Content-Type: application/json" -X POST https://feedbin.com/pages
View .zshrc
export PATH=$HOME/.bin:/usr/local/bin:/usr/local/sbin:$PATH
export ZSH=$HOME/.oh-my-zsh
# ZSH_THEME="simple"
ZSH_THEME=""
ZSH_AUTOSUGGEST_USE_ASYNC=true
NVM_LAZY_LOAD=true
View gist:158cf9856c2e26eb3f8e562237cb3696
// creates an object only once - garbage be glad ^^
let cachedObject = {};
// array to be filtered
let arr = [
{id : 0, prop : 'blah'},
{id : 1, prop : 'foo'},
{id : 0, prop : 'bar'}
]
@AbeEstrada
AbeEstrada / post-receive
Created Mar 29, 2018
Git `post-receive` script
View post-receive
#!/bin/bash
BASE=/var/www/domain.com
while read oldrev newrev refname
do
branch=$(git rev-parse --symbolic --abbrev-ref $refname)
commit=$(git rev-parse --short HEAD)
BRANCH_DIR="$BASE/$branch"
@AbeEstrada
AbeEstrada / index.html
Created Jan 18, 2018
React without node
View index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Hello React</title>
<script src="https://unpkg.com/react@^16/umd/react.production.min.js"></script>
<script src="https://unpkg.com/react-dom@^16/umd/react-dom.production.min.js"></script>
<script src="https://unpkg.com/@babel/standalone/babel.min.js"></script>
</head>
You can’t perform that action at this time.