Skip to content

Instantly share code, notes, and snippets.

View joshlawton's full-sized avatar
👨‍💻
Coding

Josh L joshlawton

👨‍💻
Coding
  • Atlanta, Georgia
View GitHub Profile
@joshlawton
joshlawton / Setup Visual Studio Code Live Server to Use HTTPS.md
Last active April 30, 2024 15:04
Visual Studio Code Live Server HTTPS Secure Server

Setup Visual Studio Code Live Server to Use HTTPS

How to setup Live Server extension for Visual Studio Code to use HTTPS with your own SSL certificate without Chrome complaining about an untrusted certificate or insecure origin.

✅ Chrome 115.0.5790.75

✅ macOS Monterey 12.6.7

Warning

Make sure Chrome is not already running.

@joshlawton
joshlawton / words-to-lowercase-regex.js
Last active April 5, 2020 07:41
Regex to match a set of words--but only if they don't appear at the beginning of the string or line
/**
* When formatting a string in title case, we capitalize the all words except articles, conjunctions,
* copulae (forms of "to be"), and prepositions (with four or fewer characters).
* The first and last words are always capitalized.
*
* Source: https://en.wikipedia.org/wiki/Letter_case#Title_case
*
* This regex uses a negative lookahead to only match the keywords if they aren't at the beginning of a line.
* Note that this regex uses the multiline flag, indicating to match each line, not just the entire string.
*
@joshlawton
joshlawton / google-calendar-event-flair-raw.jsonc
Last active September 1, 2023 17:49
Google Calendar Event Flair (Raw)
/**
* Raw JSON response for event flair images displayed on Google Calendar
* Source: https://calendar.google.com/calendar/flairdata
* @see https://www.quora.com/What-are-all-the-keywords-for-the-new-Google-Calendar-Android-app-that-will-generate-those-beautiful-images-in-the-agenda-view
* @see https://github.com/balazsorban44/google-calendar-web-material/blob/master/app/languages/events-EN.js
*/
[
[
"flairdataaction.rsr",
@joshlawton
joshlawton / Parallels Desktop 10 for Mac.md
Last active September 1, 2023 17:44
Access Yeoman app from a Win7 guest VM powered by Parallels 10 (Mac host)

Parallels Desktop 10 for Mac

  • Configure > Hardware > Network 1 > Type: Default Adapter
  • Preferences > Advanced > Network: Change Settings > select Shared and click 'Okay'

Grunt Server

In your app's Gruntfile.js or ~/grunt/config/server/connect.js, set connect server's hostname in the options to * to allow access to the server from anywhere. Unless otherwise changed, the default hostname is set to 0.0.0.0. (Based on my understanding, 0.0.0.0 will allow connections from any source on the same network adapter, whereas * will allow connections from any and all other network adapters--such as Parallels.)

var taskConfig = function(grunt) {
  grunt.config.set('connect', {