Skip to content

Instantly share code, notes, and snippets.

const formatDate = (date) => {
const year = date.getFullYear();
const month = String(date.getMonth() + 1).padStart(2, "0");
const day = String(date.getDate()).padStart(2, "0");
const hours = String(date.getHours()).padStart(2, "0");
const minutes = String(date.getMinutes()).padStart(2, "0");
const seconds = String(date.getSeconds()).padStart(2, "0");
return `${[year, month, day].join("/")} ${[hours, minutes, seconds].join(":")}`;
};
@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 / Adaptive.sublime-theme
Last active April 9, 2022 01:48
Sublime Text 4 Adaptive Theme
// Documentation at https://www.sublimetext.com/docs/themes.html
{
"variables": {},
"rules": [
// Hide sidebar heading
{
"class": "sidebar_heading",
"opacity": 0.0,
"font.size": 0,
"fg": "#101010",
@AbeEstrada
AbeEstrada / last.sh
Created January 22, 2022 03:25
ffmpeg: get last frame from video
ffmpeg -sseof -3 -i input.mp4 -update 1 -q:v 1 last.jpg
@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 / index.html
Last active January 14, 2022 00:10
Snippet: HTML5 Skeleton
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Title</title>
<link rel="stylesheet" type="text/css" href="reset.css" />
</head>
<body>
<div id="root"></div>
@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 / gist:83bf4e359f02be2ea41fceccd1d82c38
Created December 2, 2016 03:57
MacBook Pro 2016 15" Touch Bar Kernel Panic
Anonymous UUID: 704F6787-1C66-4D63-3838-CE1E576A94BF
Thu Dec 1 20:33:33 2016
*** MCA Error Report ***
CPU Machine Check Architecture Error Dump (CPU: Intel(R) Core(TM) i7-6920HQ CPU @ 2.90GHz, CPUID: 0x506E3)
CATERR detected! No MCA data found.
*** Device Tree ***
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
@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"