ffmpeg -i INPUT_FILE.mkv -c copy -pix_fmt yuv420p10le -c:v libx265 -tag:v hvc1 -preset slow -crf 27 -profile:v main10 OUTPUT_FILE.mkv
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
const { match } = require('assert'); | |
const { parse } = require('path'); | |
const readline = require('readline'); | |
const { getContainers, matchContainerByURL } = require( '/home/kadam/bin/get-docker-ips' ); | |
// Figure out if we asked for a certain number of events, or else show the 20 most recent. | |
const [ , , flag, val ] = process.argv; | |
let eventCount = 20; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const equalPoint = ( x1, y1, x2, y2 ) => ( x1 === x2 && y1 === y2 ); | |
const sum = nums => nums.reduce( ( sum, num ) => sum + num, 0 ); | |
// See https://stackoverflow.com/questions/9043805/test-if-two-lines-intersect-javascript-function | |
const linesIntersect = ( x1, y1, x2, y2, x3, y3, x4, y4 ) => { | |
if ( | |
equalPoint( x1, y1, x3, y3 ) || | |
equalPoint( x1, y1, x4, y4 ) || | |
equalPoint( x2, y2, x3, y3 ) || |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/usr/bin/env bash | |
# Usage: | |
# | |
# Run this script (via an npm run alias) with no arguments to compute the | |
# issues in files changed since you branched from "development." | |
# | |
# npm run lint:php:changed | |
# | |
# Pass a specific branch name as the first argument to determine which files |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* This file defines the project-level Webpack production configuration. It | |
* combines configs from all relevant plugins and themes into one single | |
* array (a "multi-configuration" Webpack setup) and runs those builds in | |
* a single pass. | |
*/ | |
const { basename, extname } = require( 'path' ); | |
const postcss = require( 'postcss' ); | |
const filtermq = require( 'postcss-filter-mq' ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Simplify progressive generation of a CSV output file. Permits a command to | |
* write each row to a CSV as records are considered, avoiding the need to | |
* maintain the entire dataset in memory. | |
*/ | |
/* phpcs:disable HM.Files.ClassFileName.MismatchedName */ | |
// (HM's standards want this to be class-*, which is misleading.) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Format a backtrace in a way that makes sense to me visually. | |
* Command-click on filenames in terminal output to jump to them. | |
* | |
* @param array $backtrace | |
* @return string | |
*/ | |
function backtrace_to_log( array $backtrace ) : string { | |
$table = [ [ ' file', 'function' ], [ '---------', '--------' ] ]; |
- Clone these files into a plugin directory
- Activate plugin (will populate several postmeta table rows about most recent posts)
- Open that post in the editor
- See the textbox in the Publish Status panel with label "Edit me:"
- Put any string into that input
- Try to save
- Encounter error
Updating failed. Could not update the meta value of example_post_meta in database.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* WP Post object. Only properties needed by the code are included. | |
* | |
* @typedef {object} WPPost | |
* @property {number} id ID of post. | |
* @property {number} author Post author ID. | |
* @property {number[]} categories IDs of associated categories. | |
* @property {number[]} tags IDs of associated tags. | |
* @property {number} featured_media ID of featured image. | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PROMPT=$' | |
$(git_prompt_info)[%{$fg[magenta]%}%m%{$reset_color%}%{$fg[white]%}:%{$fg[magenta]%}%~%{$reset_color%}]\ | |
%{$fg[magenta]%}%D{[%H:%M:%S]} %{$reset_color%}%# ' | |
ZSH_THEME_GIT_PROMPT_PREFIX="[%{$fg[magenta]%}" | |
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}]" | |
ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg[red]%}*%{$fg[magenta]%}" | |
ZSH_THEME_GIT_PROMPT_CLEAN="" |