Skip to content

Instantly share code, notes, and snippets.

View jimmitchell's full-sized avatar

Jim Mitchell jimmitchell

View GitHub Profile
<?php
// Gets the year of your first published post, the current year, and displays the year range between them.
// If both are the same year, just displays current year. Change "slug" to your theme's domain.
function slug_copyright() {
$fp_get_all = get_posts( array(
'numberposts' => 1,
'post_status' => 'publish',
'order' => 'ASC'
) );
<?php
// Change the page title separator.
// change "slug" to your theme's domain
function slug_document_title_separator( $sep ) {
$sep = ":";
return $sep;
}
add_filter( 'document_title_separator', 'slug_document_title_separator' );
@jimmitchell
jimmitchell / Mailplane CSS for New Gmail.css
Created July 13, 2018 20:21
This is the CSS I used for the new Gmail look with Mailplane
/* Hide zero inbox message */
.TC[colspan="3"] {
display: none;
}
/* Hide message sidebar */
.Bu:not(:first-child) {
display: none;
}
/* Hide categories links in sidebar */
div.byl.aJZ.a0L,
@jimmitchell
jimmitchell / AppleScriptPasswordGenerator.scpt
Created June 8, 2023 14:51
AppleScript to generate secure passwords.
property allowedCharacters : {33, 35, 36, 37, 38, 42, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 61, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122}
property givenPasswordLength : 21
repeat while true
try
set givenPasswordLength to text returned of (display dialog "Enter desired password length:" with title "Password Generator" default answer givenPasswordLength)
set givenPasswordLength to givenPasswordLength as integer
if givenPasswordLength is not greater than 0 then error "Please enter a valid positive integer."
exit repeat
on error errMsg