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
development: | |
adapter: postgresql | |
database: samplrs_development | |
pool: 5 | |
timeout: 5000 | |
username: Sam | |
password: | |
# Warning: The database defined as "test" will be erased and | |
# re-generated from your development database when you run "rake". |
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 'yaml' | |
d = Dir["./**/*.yml"] | |
d.each do |file| | |
begin | |
puts "checking : #{file}" | |
f = YAML.load_file(file) | |
rescue Exception | |
puts "failed to read #{file}: #{$!}" | |
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
<script> | |
if(window.opener) { | |
window.opener.location.reload(true); | |
window.close() | |
} | |
</script> |
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
#directory_controller.rb | |
class DirectoryController < UIViewController | |
def viewDidLoad | |
super | |
self.title = "Directory" | |
@table = UITableView.alloc.initWithFrame(self.view.bounds) | |
self.view.addSubview @table | |
@table.dataSource = self | |
@table.delegate = self |
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.seed_from_csv(uri) | |
CSV.read(uri).each do |row| | |
@post = Post.find_or_create_by_identifier( | |
:identifier => row[0], | |
:content => row[1], | |
:post_type => row[2], | |
:posted_at => row[5], | |
:post_impressions_unique => row[6], | |
:post_impressions_organic_unique => row[7], |
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
validate :is_employee, :on => :create | |
def is_employee | |
if self.email.split("@")[1] == Settings.company_domain | |
#is employee, do nothing | |
else | |
# if i raise 'failed check'.inspect here I confirm that an @gmail.com does not satisfy the above conditional | |
errors.add(:email, "Not VM employee") #but then no matter what I put here the record still saves | |
end | |
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
@media only screen and (max-device-width: 540px), only screen and (min-device-width: 560px) and (max-device-width: 1136px) and (-webkit-min-device-pixel-ratio: 2) { | |
body { | |
min-width: 320px !important; | |
max-width: 320px !important; | |
overflow: hidden; | |
} | |
.full-width{width:320px !important;} | |
#main-outlet { | |
padding-top: 95px !important; | |
} |
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
get '/' do | |
# Create Account | |
company_name = "Company_" + rand(1000000).to_s | |
new_account = Account.create(name: company_name) | |
# not sure whats going on here? | |
# new_account.name = "1 "+ company_name | |
# new_account.save! | |
# Create User |
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
puts "Starting Launch Sequence..." | |
sleep 1 | |
(1..10).to_a.reverse.each do |num| | |
puts num.to_s | |
sleep 1 | |
end | |
puts "BLAST OFF!" |
OlderNewer