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 / 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}

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?
@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 / 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 / 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).