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 'fast_spec_helper' | |
require 'date' | |
require_model 'generate_required_daily_lists' | |
required_constants %w(Distributor PackingList DeliveryList) | |
---- OR ---- | |
require 'fast_spec_helper' | |
require_model 'exporter', sub_dir: 'sales_csv' | |
require_model 'delivery_exporter', sub_dir: 'sales_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 'active_attr' | |
RELATIVE_APP_PATH = File.expand_path("../../app", __FILE__) | |
def construct_require_path(middle_path, name) | |
"#{RELATIVE_APP_PATH}/#{middle_path}/#{name}.rb" | |
end | |
def require_model(name) | |
require construct_require_path('models', name) |
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
%body | |
.container | |
.row | |
.span2 | |
.span10 | |
.container-fluid | |
.row-fluid | |
.span3 | |
.span3 | |
.row-fluid |
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
#!/bin/sh | |
BACKUPDIR=/Users/developer/backup/bucky/production/ | |
DAYSTAMP=`date "+%d"` | |
HOURSTAMP=`date "+%H"` | |
DAYFILE="daily_$DAYSTAMP.dump" | |
HOURFILE="hourly_$HOURSTAMP.dump" | |
DAYPATH=$BACKUPDIR$DAYFILE | |
HOURPATH=$BACKUPDIR$HOURFILE |
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
class Carousel | |
@@rectangles = [1]*5 + [2]*5 + [3]*5 + [4]*5 + [5]*5 | |
attr_accessor :carousel | |
def initialize(total_size) | |
@carousel = [] | |
fill_carousel(total_size, @carousel) | |
end |
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/ruby -w | |
puts "Counting your gems ..." | |
gems = {} | |
project_folders = Dir.entries(".").select{ |d| d !~ /^\..*/ && !File.file?(d) } | |
project_folders.each do |folder| | |
Dir.chdir(folder) do | |
if File.exists?('Gemfile') && File.file?('Gemfile') |
NewerOlder