Skip to content

Instantly share code, notes, and snippets.

Casey Watts caseywatts

Block or report user

Report or block caseywatts

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@caseywatts
caseywatts / randomgroupsofx.rb
Last active Aug 29, 2015
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 / gist:3b376d84118aad1f2c07
Last active Aug 29, 2015
Lookup Songza Song on YouTube
We couldn’t find that file to show.
View ldapexample.rb
#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}
View complie.md

Below is shown the order in which topics will be taught in the YEI Tech Bootcamp Summer 2014. 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 developercurriculum.dot -o courseprogress.png && open courseprogress.png
View complie.md

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 Aug 29, 2015
how to begin your floating dance party
View index.html
<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 Aug 29, 2015
Coffeescript + Jasmine - Pair Programming Exercise
View ppcoffee.md

(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 Aug 29, 2015
Autoload Events into PPM
View PPMUploader.md

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?
View findandreplace.md

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 / chromeextensioning.md
Last active Aug 29, 2015
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:
You can’t perform that action at this time.