Skip to content

Instantly share code, notes, and snippets.

View JMichaelTX's full-sized avatar

JMichaelTX JMichaelTX

View GitHub Profile
@JMichaelTX
JMichaelTX / Main.css
Last active December 3, 2024 10:37 — forked from chrisphenry/Main.css
Safari 7 & 9 - Customise Web Inspector font
/*Customise Safari Web Inspector font*/
/*(tested on Safari 7.0.1 on OS X Mavericks)*/
/* Tested on Safari 9.1 (11601.5.17.1) on OSX 10.11.4 as of 2016-05-08 */
/*
JMichaelTX NOTE:
- This process was written for Safari 7 (Mavericks)
- I found it worked fine with Safari 9.1 (11601.5.17.1) on OSX 10.11.4, with just a few simple changes (noted below)
*/
@JMichaelTX
JMichaelTX / 1 Mods to AppleScript formatICUDate by JMichaelTX.md
Last active December 3, 2024 10:18 — forked from ccstone/Create date-string using ICU Date-Time Format Syntax.applescript
AppleScript (ASObjC) Format Date/Time Using ISO/ICU Format Codes

MODS BY JMichaelTX on Sat, Feb 27, 2016

AppleScript Handler: on formatDate(pDate, pFormat)

  1. Changed record-style parameters to single-field parameters
  2. Added block to handle date parameter as a string, including International format (YYYY-MM-DD)
  3. Added handler/function: convertIntlDate(pDateStr)
@JMichaelTX
JMichaelTX / trimThis Function AS.applescript
Last active December 3, 2024 10:18
AppleScript Trim Function / Handler Using ASObjC (Shane Stanley)
###BEGIN~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# trimThis() Trim (remove) Characters from Left and/or Right of String
#
# Ver 1.1 2016-02-25
# AUTHOR: Shane Stanley
# (minor revisions by JMichaelTX)
# REF: MacScripter / Trim [Remove Spaces]
# http://macscripter.net/viewtopic.php?pid=182209#p182209
# PARAMETERS:
# • pstrCharToTrim : A list of characters to trim, or true to use default
@JMichaelTX
JMichaelTX / EN Mac Get & Sort Notes by Property AS.applescript
Last active February 23, 2016 09:06
Evernote Mac (EN Mac) Get and Sort Large List of Notes by Note Property using AppleScript and ASObjC.
(*
===============================================================================
[EN] Get and Sort Notes by Note Property Using "every note" Method & ASObJC [AS]
===============================================================================
VER: 2.0 LAST UPDATE: 2016-02-22
PURPOSE:
• Get and Sort Notes by Note Property Using "every note" Method & ASObJC
• This script can handle very large list of Notes
@JMichaelTX
JMichaelTX / Script Timer AS.applescript
Last active December 3, 2024 10:18
AppleScript Script #Timer using ASObjC
###——————————————————————————————————————————————
# timer(pAction) Calculate and Log Execution Time
#
# Ver 1.1 2016-02-21
#
# REF: The base ASObjC code was provided by Shane Stanley
#
# HOW TO USE:
# • You may want to run the script at least 3 times
# • The first run may be high
@JMichaelTX
JMichaelTX / EN Set Note Creation Date from Selection AS.applescript
Created February 13, 2016 02:56
Evernote Mac Set Note Creation Date from Selection using AppleScript
(*
=================================================================
SCRIPT NAME: Set EN CreationDate from Selection
DATE: Thu, Jan 7, 2016 VER: 1.2
PURPOSE:
• Set the EN Note Creation Date using text date which is selected
• Expects the text date format to be in the form based on current Sys Pref settings
• For USA: "Mon d, yyyy" or "m/d/yyyy"
@JMichaelTX
JMichaelTX / Set KM Variable Function AS.applescript
Last active December 3, 2024 10:19
Set Keyboard Maestro (KM) Variable using AppleScript
###——————————————————————————————————————————————
# setKMVar() Sets KM Variable, Makes if needed
#
# Ver 2.0 2015-12-27
###——————————————————————————————————————————————
on setKMVar(pKMVarName, pKMVarValue)
--log ("setKMVar: " & pKMVarName & ": " & pKMVarValue)
tell application "Keyboard Maestro Engine"
@JMichaelTX
JMichaelTX / Get & Set Functions for KM Variables JXA.js
Created February 11, 2016 01:34
JXA Functions to Get and Set Keyboard Maestro (KM) Variables using JavaScript for Automation (JXA)
//=====================================================================
function setKMVar(pstrName, pstrValue) {
//=====================================================================
var app = Application.currentApplication()
app.includeStandardAdditions = true
var appKM = Application("Keyboard Maestro Engine")
var oVars = appKM.variables
@JMichaelTX
JMichaelTX / Transform String on Clipboard to Title Case JXA.js
Created February 11, 2016 01:18
Transform String on Clipboard to Title Case using JavaScript for Automation (JXA)
/*
⩶⩶⩶⩶⩶⩶⩶⩶⩶⩶⩶⩶⩶⩶⩶⩶⩶⩶⩶⩶⩶⩶⩶⩶⩶⩶⩶⩶⩶⩶
[STRINGS] Transform String on Clipboard to Title Case [JXA]
⩶⩶⩶⩶⩶⩶⩶⩶⩶⩶⩶⩶⩶⩶⩶⩶⩶⩶⩶⩶⩶⩶⩶⩶⩶⩶⩶⩶⩶⩶
DATE: Wed, Feb 10, 2016
AUTHOR: JMichaelTX (in most forums)
Find any bugs/issues or have suggestions for improvement?
Contact me via PM or at blog.jmichaeltx.com/contact/
REF: https://github.com/gouch/to-title-case/blob/master/to-title-case.js
@JMichaelTX
JMichaelTX / EN Create Note Link as File AS.applescript
Created February 9, 2016 01:30
Evernote Mac Create File (.inetloc) Using Note Classic Link with AppleScript