This file contains hidden or 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
module ActiveAdmin | |
module Views | |
module Pages | |
class Index < Base | |
protected | |
def render_index | |
renderer_class = find_index_renderer_class(config[:as]) | |
This file contains hidden or 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' | |
require 'date' | |
CSV::Reader.parse(File.open(ARGV[0])) do |row| | |
date = row[0].match(/^\d{4}-\d{2}-\d{2}/) ? Date.strptime(row[0], "%Y-%m-%d") : row[0] | |
hours = row[2] | |
memo = "#{row[3]} #{row[4]}" | |
puts "#{date} | #{hours} | #{memo}" | |
end |
This file contains hidden or 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 'rubygems' | |
require 'yaml' | |
# Add users quickly from command line to email_list.txt | |
# usage is: | |
# $ ruby email_list.rb [name] [email] | |
name, email = ARGV | |
file_name = 'email_list.txt' |