-
Inject profiling code
At the beginning of your .zshrc add following:
zmodload zsh/zprof
and at the end add:
zprof
This will load zprof mod and display what your shell was doing durung your initialization.
# Bun is now officially supported and these environments variables are no longer needed. Keeping this gist for legacy purposes. | |
# SKIP_DEPENDENCY_INSTALL=true | |
# UNSTABLE_PRE_BUILD=asdf install bun latest && asdf global bun latest && bun i |
# Manual opt parsing example | |
# | |
# Features: | |
# - supports short and long flags (ie: -v|--verbose) | |
# - supports short and long key/value options (ie: -f <file> | --filename <file>) | |
# - supports short and long key/value options with equals assignment (ie: -f=<file> | --filename=<file>) | |
# - does NOT support short option chaining (ie: -vh) | |
# - everything after -- is positional even if it looks like an option (ie: -f) | |
# - once we hit an arg that isn't an option flag, everything after that is considered positional | |
function optparsing_demo() { |
<?php | |
/* | |
Plugin Name: Fix WooCommerce Template Cache | |
Plugin URI: https://woocommerce.com | |
Description: This fixes some issues with WC's template caching on sites that use multiple containers, due to the entire path being cached. If the file does not exist, this script uses default WC logic (copy/pasted) to grab the correct templates. | |
Version: 1.0.0 | |
Author: Julien Melissas | |
Author URI: https://julienmelissas.com | |
*/ | |
add_filter('wc_get_template_part', function( $template, $slug, $name ) { |
<?php | |
namespace App\Traits; | |
/** | |
* Traits that eases the use of ORDER BY FIELD with an eloquent model. | |
* https://github.com/laravel/ideas/issues/1066 | |
*/ | |
trait OrderByField | |
{ |
In anticipation of my shiny new Xbox One X showing up I began buying and ripping 4K UHD Bluray disks, so my Plex media server would have some content on it that could take advantage of my new hardware.
I was pretty dissapointed when I discovered none of it worked very well for me at all. After a lot of trial and error I think I've worked out the situation of 4K media on Xbox One, and how to get your library ready to handle it.
My problem is my televsion does not support 10 bit HDR video. I bought it at a very steep discount, and while its a great simple 4K UHD TV, it does not support 10 bit HDR video. The exact model is a Dish TV NZ 55" UHD TV.
I serve my files via Plex from a local server, over gigibit ethernet. On the Xbox I normally use the DLNA option in the Media Player app, but I have also experimented with using the official Plex Xbox One app. I decided I hate using this after some experimenting, and I'll explain
[ | |
{ | |
"name": "Alberta", | |
"abbreviation": "AB" | |
}, | |
{ | |
"name": "British Columbia", | |
"abbreviation": "BC" | |
}, | |
{ |
Give developers more knowledge about how the classes behave in a non-relative sense: BEM + ITCSS = BEMIT
BEM:
Install convmv if you don't have it
sudo apt-get install convmv
Convert all files in a directory from NFD to NFC:
convmv -r -f utf8 -t utf8 --nfc --notest .