Use .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
Me on a bike (2018/19 Season)
Zombie Goat Enduro
Dino Enduro
Hill Country Eagle Enduro
O’Rock Epic Enduro
Shiner GASP 2019
Published on March 29, 20192018 Top Listens
- Yo La Tengo
422 - Iron Chic
247 - Nancy Pants
223 - Hot Snakes
154 - Sturgill Simpson
125 - Built to Spill
122 - Galaxie 500
120 - The Magnetic Fields
115 - Jawbreaker
113 - Superchunk
106 - Leon Bridges
100 - Blended Babies
92 - The Menzingers
91 - Miles Davis
79 - The Velvet Underground
77 - PUP
76 - The Dead Milkmen
76 - teklife
75 - Ultramarine
75 - Big Star
73 - Diarrhea Planet
72 - Ol’ Burger Beats
71 - Guided by Voices
69 - Pavement
65 - Courtney Barnett
64 - Michael Bublé
64 - Thin Lips
64 - Melvins
62 - Pkew Pkew Pkew
61 - Pile
58 - Thee Oh Sees
57 - BROCKHAMPTON
56 - Waxahatchee
55 - The Modern Lovers
54 - Hop Along
53 - Keys N Krates
53 - The Joy Formidable
51 - Jlin
49 - Nice As Fuck
49 - Twin Peaks
48 - Big Thief
47 - Nick Drake
47 - The Aquabats!
46 - J Dilla
45 - The Beatles
45 - The Breeders
45 - Wilco
45 - Boys Noize
44 - Cass McCombs
44 - The Midnight Hour
44
Jailed SFTP only share with chroot using mount –bind to share directory
1) Setup SSH jail in /etc/ssh/sshd_config
Match User JAILED_USER_NAME
ForceCommand internal-sftp
ChrootDirectory /jailed/directory
AllowTcpForwarding no
X11Forwarding no
2) Restart SSHD
systemctl restart sshd
3) Test
4) Setup dir share from somewhere else in filesystem using:
mount --bind /jailed/directory /somewhere/else
Remember that path to jailed dir must be owned by root
and the share dir must be in a group that is writable by the jailed user. This will also only stick around till the next reboot, if you need something more permanent look into using fstab.
Force word wrap on long strings
Sometimes web content requires having a long URL which can extend or break the container which encloses it. Chris Coyier saves the day again. Thanks!
.dont-break-out { /* These are technically the same, but use both */ overflow-wrap: break-word; word-wrap: break-word; -ms-word-break: break-all; /* This is the dangerous one in WebKit, as it breaks things wherever */ word-break: break-all; /* Instead use this non-standard one: */ word-break: break-word; /* Adds a hyphen where the word breaks, if supported (No Blink) */ -ms-hyphens: auto; -moz-hyphens: auto; -webkit-hyphens: auto; hyphens: auto; }Published on February 28, 2018