Skip to content

Instantly share code, notes, and snippets.

View caseywatts's full-sized avatar
Hi, I’m Casey!

Casey Watts caseywatts

Hi, I’m Casey!
View GitHub Profile
@caseywatts
caseywatts / 0 - Chrome Workshop.md
Last active August 30, 2023 06:48
Chrome Extension Workshop
@caseywatts
caseywatts / findandreplace.md
Last active August 29, 2015 14:09
Find And Replace

Goal

Learn how to use javascript regular expressions to find and replace text on web pages.

This example finds instances of "New Haven" and replaces them with "Ancient Sanctuary".

New Haven => Ancient Sanctuary

Write your own string and do find-and-replace there

@caseywatts
caseywatts / bookmarkleting.md
Last active May 2, 2024 03:04
Making Bookmarklets

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 / chromeextensioning.md
Last active December 29, 2022 03:02
Chrome Extensioning

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:
@caseywatts
caseywatts / MAILME.md
Last active August 29, 2015 14:15
MailMe

MailMe is a super short ruby script that uses pony to send yourself a file from the computer you're on.

Installation

git clone https://gist.github.com/cb0ca98e1b27342a6720.git ~/mailme
gem install pony
cd ~/mailme
ln -s $PWD/mailme /usr/local/bin/
@caseywatts
caseywatts / slugify-for-pivotal-install.md
Last active June 10, 2017 17:47
Slugify Pivotal Ticket Name (for git branch name)
@caseywatts
caseywatts / index.html
Last active August 29, 2015 14:17
whoiscc
<html>
<body>
<a onclick="window.external.AddSearchProvider('https://gist.githubusercontent.com/caseywatts/c385e6c7fc3e8d923093/raw/7d0c69332ea7c9ae4490f55a3d2c71f9b99403cd/whois-cc.xml');" href="#">Add Continuity Control Directory Search By Name</a>
</body>
</html>
@caseywatts
caseywatts / README.md
Last active August 29, 2015 14:23
dancing & gender roles

You can paste the contents of the .dot file into something like this (auto-reloads nicely but goes down sometimes) or this (not as pretty but breaks less).

@caseywatts
caseywatts / meetup site jekyll.md
Last active November 1, 2016 17:39
How To: Tech Meetup Jekyll Site

How to make a meetup site quickly

Set up Jekyll

If you haven't before, make your own Jekyll site first to understand how it works and what the pieces are. Last time I made one, this is what I had to do:

Install Jekyll

gem install jekyll
jekyll new
@caseywatts
caseywatts / 0tableOfContents.dot
Last active October 9, 2015 15:21
Intro to Graphviz
digraph {
1 -> "Simple Nodes" ->
"http://graphviz-repl.herokuapp.com/intro-to-graphviz-1"
2 -> "Attributes = Lables, Colors, Styles" ->
"http://graphviz-repl.herokuapp.com/intro-to-graphviz-2"
3 -> "Subgraphs" ->
"http://graphviz-repl.herokuapp.com/intro-to-graphviz-3"