Skip to content

Instantly share code, notes, and snippets.

@tkadlec
tkadlec / perf-diagnostics.css
Last active June 8, 2023 17:47
CSS used to highlight potential performance issues
:root {
--violation-color: red; /* used for clear issues */
--warning-color: orange; /* used for potential issues we should look into */
}
/* IMAGES */
/*
* Lazy-Loaded Images Check
* ====
@davidwebca
davidwebca / gist:e26186b8f4c6795b19c043fffb6f9861
Last active December 18, 2023 15:29
Detect black screen and split with ffmpeg remux
# Splits video to separate scenes files when full black frames are found in the video
# Inspired by https://gist.github.com/achesco/4dc2ebf13378a0a61fc26c7fe01f539e
# Who got inspired by https://stackoverflow.com/a/38205105
#!/bin/bash
file=""
out="./"
dur=0.05
stripaudio=""
@dvlden
dvlden / ffmpeg.md
Last active April 17, 2024 19:53
Convert video files to MP4 through FFMPEG

This is my personal list of functions that I wrote for converting mov files to mp4!

Command Flags

Flag Options Description
-codec:a libfaac, libfdk_aac, libvorbis Audio Codec
-quality best, good, realtime Video Quality
-b:a 128k, 192k, 256k, 320k Audio Bitrate
-codec:v mpeg4, libx264, libvpx-vp9 Video Codec
@jamiebergen
jamiebergen / _description.md
Last active March 18, 2022 17:34
Gitignore whitelist approach #git
@abegit
abegit / wc_order_status_changes.php
Created February 2, 2016 20:11
WooCommerce Hooks for Order Status Changes
function mysite_pending($order_id) {
error_log("$order_id set to PENDING", 0);
}
function mysite_failed($order_id) {
error_log("$order_id set to FAILED", 0);
}
function mysite_hold($order_id) {
error_log("$order_id set to ON HOLD", 0);
}
function mysite_processing($order_id) {
@learncodeacademy
learncodeacademy / flightplan-html.md
Last active February 26, 2021 22:07
Deploy HTML site with Flightplan

###Prerequesites

Install flightplan globally

npm install -g flightplan

Install flightplan in your project folder

@bbaaxx
bbaaxx / Vagrantfile
Last active October 21, 2018 11:12
Vagrantfile for a cheap ember-cli box (with NVM)
# -*- mode: ruby -*-
# vi: set ft=ruby :
box = 'ubuntu/trusty64'
hostname = 'emberclibox'
domain = 'example.com'
ip = '192.168.42.42'
ram = '512'
$rootScript = <<SCRIPT
@LeaVerou
LeaVerou / dabblet.css
Created July 14, 2014 00:37
Scoop corners with only one gradient
/**
* Scoop corners with only one gradient
* Caveats: backdrop must be a solid color,
* dimensions need to be known
* For more flexibility, see: http://lea.verou.me/2011/03/beveled-corners-negative-border-radius-with-css3-gradients/
*/
div {
width: 400px;
height: 300px;
@vedant
vedant / gist:9333992
Last active May 27, 2020 06:46
Export note files from Google Keep
/* Vedant Misra (vedantmisra.com) (github.com/vedant)
*
* Script for exporting Google Keep note files.
*
* This does not handle attachments or checklists, only note files. Downloads
* each note to a .txt file named for the note's title.
*
* To use this, go to https://drive.google.com/keep/ and wait for the page to
* fully load all of your saved notes; scroll to the bottom to confirm they're
* loaded. Then paste the below in your URI bar, go to the start of the line,
@plentz
plentz / nginx.conf
Last active April 24, 2024 11:15
Best nginx configuration for improved security(and performance)
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048