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
View MAILME.md

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/
View index.html
<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 Aug 29, 2015
dancing & gender roles
View README.md

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 / RoR Ubuntu STC 2012
Created May 29, 2012
Bash Script for Ubuntu RoR Setup - STC Summer 2012
View RoR Ubuntu STC 2012
#!/bin/bash
# This probably won't run as a script, but you can copy sections at a time.
# Before running, change CAPITAL LETTERS to the appropriate variables you have
#When you get stuck on installation for "ttf-mscorefonts-installer", press [Tab] then [Return] to accept the agreement.
sudo apt-get update
sudo apt-get install mysql-server mysql-client
sudo apt-get install libmysql-ruby libmysqlclient-dev
sudo apt-get install build-essential mysql-server gedit-plugins ri phpmyadmin msttcorefonts openjdk-6-jdk git-core
sudo apt-get install sqlite3 libsqlite3-dev libsqlite3-ruby
@caseywatts
caseywatts / gist:2950239
Created Jun 18, 2012
You can use Meld for Mac too!
View gist:2950239
#Install Fink (which is sorta like brew)
#http://www.finkproject.org/download/index.php?phpLang=en
#Install Meld
fink install meld
#connect it to git diff
http://linux.subogero.com/414/git-diff-meld/
chmod +x ~/gitvdiff
@caseywatts
caseywatts / RoR Setup bash.sh
Created Jun 19, 2012
Bash Script for OS X RoR Setup - STC Summer 2012
View RoR Setup bash.sh
### Install XCode
# Follow Instructions at https://developer.apple.com/xcode/
# In Xcode preferences, enable command line tools
## rbenv for ruby compiling and managing versions
## https://github.com/sstephenson/rbenv/
brew install rbenv
brew install ruby-build
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
View 0tableOfContents.dot
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"
@caseywatts
caseywatts / gist:4234178
Created Dec 7, 2012
Getting code_swarm to work
View gist:4234178
#Notes:
#~/Code/shifts is a github project I've been working on
#
## Complete prerequisites on https://github.com/rictic/code_swarm
## Clone the repo, patch it
cd ~/Code
git clone git://github.com/rictic/code_swarm.git
# one commit was giving me trouble, and I don't know how to pull request a better solution
@caseywatts
caseywatts / WhoLacksShiftsPhoto.rb
Created Feb 14, 2013
Run this in a pry/irb session, with the Shifts database loaded.
View WhoLacksShiftsPhoto.rb
profiles = UserProfile.all.select{|profile| profile.user.is_active?(Department.first)}
emails = []
profiles.each do |profile|
if profile.photo_file_name == nil
emails << profile.user.email
puts profile.user.email
end
end
@caseywatts
caseywatts / gist:5138333
Created Mar 11, 2013
Get emails of users who have worked in a location over a time period (Shifts app)
View gist:5138333
user_emails = []
Shift.after_date(Time.now - 4.weeks).find_all_by_location_id(44).each do |sh|
user_emails << sh.user.email
end
user_emails = user_emails.uniq
You can’t perform that action at this time.