Skip to content

Instantly share code, notes, and snippets.

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:.

@caseywatts
caseywatts / darken.md
Last active Mar 31, 2021
Darkening PDFs
View darken.md

short url to these instructions: caseywatts.com/darken

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

Using Monochrome (recommended)

  • obtain your ugly, gray pdf
  • brew install imagemagick
  • brew install ghostscript
  • magic command!
@caseywatts
caseywatts / 0-self-publishing.md
Last active Mar 26, 2021
Self-Publishing via Markdown
View 0-self-publishing.md
@caseywatts
caseywatts / chromeextensioning.md
Last active Mar 22, 2021
Chrome Extensioning
View chromeextensioning.md

Chrome is, by far, the easiest browser to make extensions for. Google's documentation for this is pretty good and thorough!

Getting Started

Setup

  1. Make a folder cloudtobutt somewhere on your computer (in a code folder? or on your desktop? up to you!)
  2. Save your js script in that folder as cloudtobutt.js
  3. Make a file named manifest.json and copy-paste in an example:
View MediawikionHeroku.md
@caseywatts
caseywatts / quicktime-hangouts-recording.md
Last active Mar 11, 2021
Quicktime Hangouts Recording (using soundflower for audio)
View quicktime-hangouts-recording.md

Short link to this page: caseywatts.com/quicktime

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

Quicktime + Hangouts Recording

Scenario: You want to talk with someone over google hangouts (like for a user study), and you want to record BOTH:

@caseywatts
caseywatts / randomgroupsofx.rb
Last active Mar 10, 2021
Random Groups of X
View randomgroupsofx.rb
LISTOFNAMES = %{...}
GROUPSIZE = 5
names = LISTOFNAMES.split("\n")
shufflednames = names.shuffle
shufflednames.each_slice(GROUPSIZE).with_index do |group, i|
puts "\nGroup " + i.to_s
group.each {|name| puts name}
end
@caseywatts
caseywatts / 0 push to talk.md
Last active Mar 3, 2021
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 Feb 26, 2021
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!