Skip to content

Instantly share code, notes, and snippets.

@rameyrobo
rameyrobo / gist:32a6db676478cd0bef3d119cf0e6bff1
Last active May 5, 2021 10:27
How to open Google Chrome command on Mac OSx to fix Chrome blank screen after enabling 'Override software rendering list'
open -n -a /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --args --disable-gpu
<?php _e(date('Y')); ?>
@rameyrobo
rameyrobo / addClassIfIdExists.js
Last active January 27, 2020 22:10
jQuery addClass if id is present on page
// Adding a class if id exists
if ($("#ifIdIsPresent")[0]){
$(".targetClass").addClass( "new-class" );
}
ffmpeg -i input.mp4 -c:v libtheora -q:v 7 -c:a libvorbis -q:a 4 output.ogv
@rameyrobo
rameyrobo / gist:a5c454d352e10dc0f06276dddae06236
Created June 13, 2019 00:33
Convert .mp4 to .webm in ffmpeg
ffmpeg -i Video_Title.mp4 -c:v libvpx -crf 10 -b:v 1M -c:a libvorbis Video_Title.webm
@rameyrobo
rameyrobo / gist:7bdad9e4550f8ccc5a59abde4e4c38b8
Last active March 14, 2022 04:38
Google Sheets Formulas
// REMOVE BEGINNING OF N CHARACTERS OF TEXT
// (Removes first three characters of strings located in array)
=ArrayFormula(right(D1:D15,len(D1:D15)-3))
// (Removes the first character in first column and the first three columns in the second column)
=ArrayFormula(replace(A1:B10,1,3,""))
@rameyrobo
rameyrobo / gist:2e8270f155729c843abdeccc0390ae93
Created December 14, 2018 22:14
Find handle for your Wordpress plugins
# Finding handle for your plugins
function display_script_handles() {
global $wp_scripts;
if(current_user_can('manage_options')){ # Only load when user is admin
foreach( $wp_scripts->queue as $handle ) :
$obj = $wp_scripts->registered [$handle];
echo $filename = $obj->src;
echo ' : <b>Handle for this script is:</b> <span style="color:green"> '.$handle.'</span><br/><br/>';
endforeach;
}
@rameyrobo
rameyrobo / gist:104aa09f793aed8f7a70e49d4b257dd7
Created November 9, 2018 15:07
Preferred youtube-dl download settings
youtube-dl -v --no-cache-dir --rm-cache-dir --prefer-ffmpeg --hls-prefer-ffmpeg -R infinite -c --ignore-errors --audio-quality 8 --audio-format wav --ffmpeg-location /usr/local/Cellar/ffmpeg/4.1/bin/ffmpeg VIDEO/PLAYLIST-URL
@rameyrobo
rameyrobo / gist:1827e665ece42b0f8870dd5c762e570c
Created November 9, 2018 15:03
Preferred handbrake conversion
handbrakeCLI -i INPUT-FILENAME -o OUTPUT-FILENAME -B 320 -e x264