This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ENV["WATCHR"] = "1" | |
system 'clear' | |
def growl(message) | |
growlnotify = `which growlnotify`.chomp | |
title = "Watchr Test Results" | |
message.gsub!(/\e\[\d+m/, "") | |
image = message.include?('0 failures, 0 errors') ? "~/.watchr_images/passed.png" : "~/.watchr_images/failed.png" | |
options = "-w -n Watchr --image '#{File.expand_path(image)}' -m '#{message}' '#{title}'" | |
system %(#{growlnotify} #{options} &) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* This pattern allows you to manually return the functions you want to be public, | |
* thus allowing for private functions. | |
*/ | |
var Mcard = (function() { | |
/** | |
* Helper to update form and results based on query as retrieved from a url | |
* change. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def self.are_you_using_this | |
## get all of the users | |
u = User.all | |
## for each user, do the following thing | |
u.each do |u| | |
## get the date of user’s latest session | |
last_session_date = u.sessions.last ? u.sessions.last.created_at : nil |