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
# hubot-scripts test | |
# usage: | |
# hubot cmd ls -la | |
# | |
fs = require('fs') | |
spawn = require('child_process').spawn | |
module.exports = (robot) -> | |
robot.respond /(cmd) (.*) (.*)/i, (msg) -> | |
cmd = msg.match[2] | |
arg = msg.match[3] |
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 ruby | |
require 'csv' | |
# This assumes: | |
# - Ruby 1.9's CSV library, if you are using 1.8, use FasterCSV. | |
# | |
# https://raw.github.com/hadley/data-baby-names/master/baby-names.csv | |
csv_fname = "baby-names.csv" |
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
require 'rubygems' | |
require 'google_drive' | |
# set your username and password | |
login = GoogleDrive.login(GoogleDrive::USERNAME, GoogleDrive::PASSWORD) | |
# set your spreadsheet key | |
sheet = login.spreadsheet_by_key(GoogleDrive::SPREADSHEET) | |
sheet.worksheets.each do |ws| | |
p ws.title |