gulp.watch not firing with changed files when run in WSL
Using WSL Debian for dev and gulp.watch is not running when files are changed on the Windows side. Solution is to add {interval: 1000, usePolling: true} to the gulp.watch event.
For example, here’s the styles portion of my gulp.watch task.
gulp.watch([path.source + 'styles/**/*'], {interval: 1000, usePolling: true}, gulp.series('styles'));
Published on August 19, 2020
Match and replace content in WordPress the_title()
In a situation where content in the_title() needed to be italicized.
function fix_the_title( $title ) {
$new_title = $title;
$pattern = '/Content to Match/';
$replace = '<em>$0</em>';
$new_title = preg_replace($pattern, $replace, $new_title);
return $new_title;
}
add_filter( 'the_title', 'fix_the_title' );
Add that to functions.php and you’re good.
Published on July 1, 20202019 Top Listens
- The Black Keys
291 - Sturgill Simpson
198 - Yo La Tengo
197 - Pkew Pkew Pkew
189 - Big K.R.I.T.
178 - Harry Nilsson
163 - Chance the Rapper
155 - Leon Bridges
153 - Maggie Rogers
149 - Michael Bublé
144 - White Denim
144 - PUP
141 - Ol’ Burger Beats
136 - The Beach Boys
128 - Neko Case
122 - Kurt Vile
116 - Big Star
109 - mclusky
109 - Built to Spill
103 - WESTERN SETTINGS
94 - Wilco
94 - Gucci Mane
93 - The Sea and Cake
91 - Twin Peaks
85 - DJ Shadow
84 - Dead Bars
78 - Mac DeMarco
76 - The Modern Lovers
75 - Bleached
74 - The Menzingers
74 - Merle Haggard
73 - Shannon and the Clams
72 - The Beatles
72 - Freddie Gibbs
71 - Nick Drake
71 - James Brown
69 - Nice As Fuck
68 - Guided by Voices
63 - Allah-Las
61 - Teebs
61 - Vince Guaraldi Trio
61 - Jeff Tweedy
60 - The Growlers
60 - Cornelius Brothers & Sister Rose
56 - Françoise Hardy
56 - Jay Som
56 - Miles Davis
54 - emune
53 - Neil Young
53 - John Denver & the Muppets
50
Me on a bike (2019/20 Season)
Race Down Spider Mountain – TTP Season Ender
Zombie Goat Enduro – Flat Rock Ranch
Dino Enduro – Dino State Park
Redemption Enduro
Published on December 20, 2019Use .htaccess to remove any query string and redirect to site root
RewriteEngine on
RewriteCond %{QUERY_STRING} .
RewriteRule ^$ /? [R,L]
Published on December 19, 2019
Negative value for margin using calc() in SCSS
Using SCSS and need to set a negative margin with calc on an interpolated variable. Here’s the solution:
.container {
margin-top: calc((#{$VAR_NAME} + 0px)/-1); // divide by -1 to get a negative result
}
Published on November 18, 2019
Pretty List Item Disc Coloring with SCSS
Since I seem to be asked for these frequently, I am putting this here for quick reference, as well as posterity.
ul {
list-style: none;
margin: 0 0 25px;
padding: 0;
li {
margin: 0;
padding: 0 0 0 30px;
text-indent: -15px;
&::before {
content: "• ";
color: gold; // it's a pretty color
}
}
}
Published on November 6, 2019
Get list of installed programs with PowerShell in Windows
In PowerShell run:
To get a list of installed programs:
Get-ItemProperty HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\* | Select-Object DisplayName, DisplayVersion, Publisher, InstallDate | Format-Table -AutoSize > c:\Users\YOUR_USER\Documents\list-installed-programs.txt
To get a list of app store installed programs:
Get-AppxPackage | Select Name, PackageFullName |Format-Table -AutoSize > c:\Users\YOUR_USER\Documents\list-installed-programs.txt
NOTE: Yes, this is all over the internet, but I wanted it here so I could find it faster next time.
Published on October 15, 2019Pool/Spa Cooling Formula
As I’ve had use of this in the past I am putting it here for future reference.
PI = (V/1000) * DCD * 43.75
Where:
PI = Pounds of ice required
V = Volume of water in gallons
DCD = Degrees Cooling Desired; Current – Desired temp in °F
Note: Not sure where the 43.75 constant comes from. Will update if/when I find a source.
Note 2: This is of interest and could be used to rework the above formula: http://www.hk-phy.org/contextual/heat/cha/la_he07_e.html
Published on September 3, 2019Random Character Formula for Calc
=CHAR(RANDBETWEEN(97;122))&CHAR(RANDBETWEEN(97;122))&CHAR(RANDBETWEEN(97;122))&CHAR(RANDBETWEEN(97;122))&CHAR(RANDBETWEEN(97;122))&CHAR(RANDBETWEEN(97;122))&CHAR(RANDBETWEEN(97;122))&CHAR(RANDBETWEEN(97;122))Published on April 25, 2019












