Skip to content

Instantly share code, notes, and snippets.

@AbeEstrada
AbeEstrada / first.sh
Created January 22, 2022 03:11
ffmpeg: get first frame from video
ffmpeg -i input.mp4 -ss 00:00:00 -frames:v 1 first.jpg
@AbeEstrada
AbeEstrada / details.html
Created January 5, 2022 00:29
Hugo Shortcode: Details
{{ if .Inner }}<details {{ if eq (.Get "open") "true" }}open{{ end }}>
{{ with .Get "title" }}<summary>{{.}}</summary>{{ end }}
{{ .Inner | markdownify }}
</details>{{ end }}
@AbeEstrada
AbeEstrada / Monokai.sublime-color-scheme
Last active April 9, 2022 01:48
Sublime Text Monokai Color Scheme
// Documentation at https://www.sublimetext.com/docs/color_schemes.html
{
"variables": {},
"globals": {
"background": "#19171a",
"selection": "#333",
"selection_border": "#333",
"stack_guide": "var(grey)",
"active_guide": "var(purple)",
"line_highlight": "var(black3)",
@AbeEstrada
AbeEstrada / Force_MFA.json
Last active March 4, 2020 02:49
Allows MFA-Authenticated IAM Users to Manage Their Own Credentials on the My Security Credentials Page
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AllowViewAccountInfo",
"Effect": "Allow",
"Action": [
"iam:GetAccountPasswordPolicy",
"iam:GetAccountSummary",
"iam:ListVirtualMFADevices"
@AbeEstrada
AbeEstrada / gist:804dcb819da6c237d123e4d212892bae
Created January 10, 2020 03:22
Convert .mov to .mp4 with ffmpeg
ffmpeg -i in.mov -vcodec h264 -acodec mp2 out.mp4
@AbeEstrada
AbeEstrada / gist:dd5bbc65b4e0f4074703f9bce926a146
Created October 22, 2019 01:33
Download and merge (concat) video files m3u8
ffmpeg -i "https://<URL>.m3u8" -codec copy video.mp4
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
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
// 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'}
]
World