Skip to content

Instantly share code, notes, and snippets.

Avatar
😄
Hi, I’m Casey!

Casey Watts caseywatts

😄
Hi, I’m Casey!
View GitHub Profile
@caseywatts
caseywatts / 0-self-publishing.md
Last active Sep 21, 2022
Self-Publishing via Markdown
View 0-self-publishing.md
View Electron on WSL2.md

Electron is tricky to get set up on Windows Subsystem for Linux, but it can work!

Four things needed overall:

  1. you need WSL2, not WSL1
  2. you need node, of course, and that part isn't so bad
  3. you need to apt install several dependencies
  4. you need an X Server so it can display the electron GUI over in Windows-land

Setup instructions, in order:

View bookmarkleting.md

This is one chapter of my "Chrome Extension Workshops" tutorial, see the rest here: https://gist.github.com/caseywatts/8eec8ff974dee9f3b247

Unrelated update: my book is out! Debugging Your Brain is an applied psychology / self-help book

Making Bookmarklets

I'm feeling very clever. I've got this sweet line of javascript that replaces "cloud" with "butt". My mom would LOVE this, but she doesn't computer very well. I'm afraid to show her the Developer Console and have her type/paste this in. But she IS pretty good at bookmarks, she knows just how to click those!

A bookmark normally takes you to a new web page. A bookmarklet is a bookmark that runs javascript on the current page instead of taking you to a new page. To declare that it is a bookmarklet, the "location" it points to starts with javascript:.

View MediawikionHeroku.md
@caseywatts
caseywatts / 0 push to talk.md
Last active Jul 20, 2022
Push To Talk - Google Meet Bookmarklet
View 0 push to talk.md

Short link to this page: http://caseywatts.com/ptt

Other gists & tricks: http://caseywatts.com/gists-and-tricks

Unrelated update: my book is out! Debugging Your Brain is an applied psychology / self-help book

Push To Talk in a Google Hangout (Meet)

  1. Save this bookmarklet. Right-click on boomarks toolbar Add Page...
  • Name: PTT (push to talk) or whatever you'd like (maybe short so it stays on your bookmarks toolbar)
@caseywatts
caseywatts / 0instructions.md
Last active Jul 7, 2022
Easily fill out web forms using data from a spreadsheet using this bookmarklet.
View 0instructions.md

Other gists & tricks: http://caseywatts.com/gists-and-tricks

To set this up, paste the code below into the "location" of a bookmark. Make sure it starts with "javascript:", some browsers strip this out when you paste.

  1. Find the "name" of each form element you want to put data into. You can find the "name" by right clicking on the form box and "inspecting" it.
  2. By using a spreadsheet, create a set of urls with the data you want to input. Example: variablename1 is the "name" of the form field. "value1" is the value you want to put into the box.www.website.com/page.html?variablename1=value1&variablename2=value23. Navigate to that custom URL4. Click the bookmarklet. Voila!
@caseywatts
caseywatts / 0-README.md
Last active May 20, 2022
WHAT IF you could magically have browser-sync (livereload+mobileview) on every static html project, without any setup in the project? You can 🎉🎉🎉
View 0-README.md
@caseywatts
caseywatts / 0 - Chrome Workshop.md
Last active May 20, 2022
Chrome Extension Workshop
View 0 - Chrome Workshop.md
@caseywatts
caseywatts / OpenCurrentImageInPixlrExpress.md
Last active May 20, 2022
OpenCurrentImageInPixlrExpress
View OpenCurrentImageInPixlrExpress.md

Short link to this page: http://caseywatts.com/pixlr

Other gists & tricks: http://caseywatts.com/gists-and-tricks

Open Current Image in Pixlr Express

This bookmarklet is good for quickly modifying an image, such as overlaying some text.

  1. Save this bookmarklet. Right-click on boomarks toolbar Add Page...
  • Name: pixlr or whatever you'd like (maybe short so it stays on your bookmarks toolbar)
@caseywatts
caseywatts / 0 README.md
Last active Feb 25, 2022
Generate Graphviz Files for Project
View 0 README.md

short url: caseywatts.com/graphviz

Graphviz is like markdown, for diagrams.

It's a tool that can transform text input into a "directed graph" output, which is nodes pointing to other nodes. You can use it for architecture diagrams, DB diagrams, documentation for users, etc.

graphviz-it

You'll want to use a tool with a two-pane layout - the left side is the source text, the right side is the image output.

  • For just you working on it, use (shown above; it has more features)