Dimox outlines a simple method for adding bread crumbs to a WordPress theme.
Basically, a simple function is added to a theme’s functions.php file, then the breadcrumb function gets included in page templates as needed.
Check it out here:
Dimox outlines a simple method for adding bread crumbs to a WordPress theme.
Basically, a simple function is added to a theme’s functions.php file, then the breadcrumb function gets included in page templates as needed.
Check it out here:
Sometimes you need a random number from javascript. In this case I needed to get a random integer to select a CSS class referencing a header image from an array to randomly show a header graphic.
Here’s the snippet:
Math.random() generates a “floating-point, pseudo-random number” in the range of 0 and 1. For example:
>>> Math.random()
0.5031280189773967
>>> Math.random()
0.5024755050937924
To get an integer for use as an array index another javascript method is required: Math.floor()
For example – to generate a random integer between 0 and 6:
>>> Math.floor(Math.random() * (6 - 0 + 1));
4
>>> Math.floor(Math.random() * (6 - 0 + 1));
6
>>> Math.floor(Math.random() * (6 - 0 + 1));
2
Or put it all in a function for easy re-use and to get a random number of any size:
// Returns a random integer between min and max
// Using Math.round() will give you a non-uniform distribution!
function getRandomInt(min, max) {
return Math.floor(Math.random() * (max - min + 1)) + min;
}
Reference:
Math.random – JavaScript | MDN.
Here’s a handy Microsoft Exchange Shell command to export a list of users with a specific domain name.
Get-Mailbox -resultsize unlimited | Select-Object displayname -expandproperty emailaddresses| Where-Object {$_.smtpaddress -like "*domain.com*"}| Select-Object displayName,SmtpAddress | Export-csv C:\domain.csv
Test post content…. Test post content…. Test post content…. Test post content….Test post content…. Test post content….Test post content…. Test post content….Test post content…. Test post content….Test post content…. Test post content….Test post content…. Test post content….Test post content…. Test post content….Test post content…. Test post content….Test post content…. Test post content….Test post content…. Test post content….Test post content…. Test post content….Test post content…. Test post content….Test post content…. Test post content….Test post content…. Test post content….Test post content…. Test post content….Test post content…. Test post content….Test post content…. Test post content….Test post content…. Test post content….Test post content…. Test post content….Test post content…. Test post content….Test post content…. Test post content….Test post content…. Test post content….Test post content…. Test post content….Test post content…. Test post content….Test post content…. Test post content….Test post content…. Test post content….
Setting up the Auto-Type KeePass hotkey in Ubuntu is pretty simple and saves time. Just open the “Keyboard” -> “Shortcuts” settings dialogue, click “Custom Shortcuts”, click the “+” sign, with the path to your keepass2 executable with the “–auto-type” parameter. (/usr/bin/keepass2 –auto-type) in my case.
Click “Apply”.
Click “New shortcut”, press “CTRL + ALT + A” – it should save, close the dialogue and KeePass auto typing should be good to go.
Reference, KeePass documentation:
Basic jQuery Slider is a nice little plugin with for basic image slideshows and content sliding.
alias.sh is a great tool to help manage aliases and easily share on multiple computers. You simply add aliases to your account and when ready, run a curl command to pull them into your bash profile.
Simple Leek, sweet potato soup recipe. Followed the recipe but omitted the Yukon gold potatoes and skipped the blending. Also added kale.
Sweet Potato Soup With Ginger, Leek and Apple — Recipes for Health – NYTimes.com.