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 / 0instructions.md
Last active October 14, 2022 00:07
Easily fill out web forms using data from a spreadsheet using this bookmarklet.

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 / README.md
Last active June 10, 2017 17:41
Autorefresh Terminal History

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

#Autorefresh Terminal History For giving presentations.

I've been trying to find a way to show an audience the recent terminal commands I've been calling. I can easily imagine doing this in a separate terminal window that just auto-refreshes showing the history of commands recently called.

I decided to try a ruby script! (Bash would be fine too, just comfort)

###Obtaining the history

@caseywatts
caseywatts / randomgroupsofx.rb
Last active March 10, 2021 19:37
Random Groups of X
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 / gist:3b376d84118aad1f2c07
Last active August 29, 2015 14:01
Lookup Songza Song on YouTube
We couldn’t find that file to show.
@caseywatts
caseywatts / ldapexample.rb
Last active August 29, 2015 14:02
LDAP Example
#Yale LDAP Example
require 'csv'
require 'net-ldap'
# Hashrocket Format
{:host => 'directory.yale.edu', :port => 389}
# "New" Format, requires keys be symbols
{host: 'directory.yale.edu', port: 389}

I wrote this skill tree diagram for teaching Intro to Programming with the YEI Tech Bootcamp Summer 2014. Boxes are greyed out after they have been covered in the course. Some topics are not required to progress to the farther parts, like how "csv import/export" isn't required to move beyond database section beyond to the web app sections, but it would be natural to teach in that section if we wanted to cover it. Each big-box section ends with a project/assessment to make sure the students understand the content enough to apply it, before move on.

This uses graphviz to print a .dot file to a png. To learn more about the dot format, check out my graphviz tutorial.

To generate the image after modifying the dot file, try this:

  1. Install graphviz brew install graphviz
  2. Run this command to create and open the image: dot -Tpng:quartz:quartz developercurriculum.dot -o courseprogress.png && open courseprogress.png

This uses graphviz to print a .dot file to a png. Boxes are greyed out after they have been covered in the course.

To learn more about the dot format, see this pdf.

To generate the image after modifying the dot file, try this:

  1. Install graphviz brew install graphviz
  2. Run this command to create and open the image: dot -Tpng:quartz:quartz developerroster.dot -o devroster.png && open devroster.png
@caseywatts
caseywatts / index.html
Last active August 29, 2015 14:03
how to begin your floating dance party
<h4>Streaming Instructions</h4>
<ol>
<li>Go to the page "Stream it!"</li>
<li>You'll see "you're in the right place :)"</li>
<li>Everyone will count down to 0</li>
<li>When the timer hits 0, a Play Now button will appear - press it as soon as you can!</li>
<li>If you hit the "play now" button late that's no problem at all - when you press "Play Now" it will automatically go to the right place in the music</li>
</ol>
<h4>Downloaded Instructions</h4>
<ol>
@caseywatts
caseywatts / ppcoffee.md
Last active August 29, 2015 14:05
Coffeescript + Jasmine - Pair Programming Exercise

(don't start this early! lol)

Goal

The goal of this exercise is to learn how to pair program effectively. This is also an exercise in test driven development. Lastly, this is a team building exercise! :D

Coffeescript is being chosen as a useful language most Student Developers aren't very familiar with yet (although it's totally okay if you are).

Environment Setup & Background

@caseywatts
caseywatts / PPMUploader.md
Last active August 29, 2015 14:07
Autoload Events into PPM

I keep track of my PPM time separately, and I'd love to be able to run a script to run over a list like this to just upload it instead of spending 3+ hours each month inputting it manually.

date time Project/RTS Activity Type Application
2014-09-29 .5 Web Team Lead RTS Routine & Maintenance Services Shifts
2014-09-29 2 SDMP RTS - Community Collaboration and Advisement

##ToDo

  1. get a more robust way to find the popup screen - maybe check for visible ones?