Skip to content

Instantly share code, notes, and snippets.

@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
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
@AbeEstrada
AbeEstrada / post-receive
Created March 29, 2018 19:38
Git `post-receive` script
#!/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 January 18, 2018 19:10
React without node
<!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>
@AbeEstrada
AbeEstrada / dracula.go
Created September 26, 2017 01:46
Dracula style for chroma
package styles
import (
"github.com/alecthomas/chroma"
)
// Dracula Style
var Dracula = Register(chroma.MustNewStyle("dracula", chroma.StyleEntries{
chroma.Comment: "#6272a4",
chroma.CommentHashbang: "#6272a4",