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
GIT | |
remote: git://github.com/spree/spree_fancy.git | |
revision: bdeaeb9ced29a4e3204d8bc9988b57808b5a71d8 | |
branch: 2-2-stable | |
specs: | |
spree_fancy (1.3.0) | |
compass-rails | |
deface (~> 1.0.0rc3) | |
jquery-ui-rails | |
spree_core (~> 2.2) |
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
source 'https://rubygems.org' | |
ruby '2.0.0' | |
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails' | |
gem 'rails', '4.0.5' | |
# Use sqlite3 as the database for Active Record | |
group :development do | |
gem 'sqlite3' |
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
$ git push heroku master | |
Fetching repository, done. | |
Counting objects: 171, done. | |
Delta compression using up to 2 threads. | |
Compressing objects: 100% (126/126), done. | |
Writing objects: 100% (148/148), 298.06 KiB | 403.00 KiB/s, done. | |
Total 148 (delta 56), reused 0 (delta 0) | |
-----> Ruby app detected | |
-----> Compiling Ruby/Rails |
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
$ bundle exec rake assets:precompile RAILS_ENV=production | |
DL is deprecated, please use Fiddle | |
DL is deprecated, please use Fiddle | |
[WARNING] You are not setting Devise.secret_key within your application! | |
You must set this in config/initializers/devise.rb. Here's an example: | |
Devise.secret_key = "c8e81db7d9ea4e19d185a54a8ade57f38ff00208e174e1c33c5ef6a3d11db0997e499969d5e497f | |
be30ebdc6828677831272" | |
[deprecated] I18n.enforce_available_locales will default to true in the future. If you really want t | |
o skip validation of your locale you can set I18n.enforce_available_locales = false to avoid this me |
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
“All courses of action are risky, so prudence is not in avoiding | |
danger (it's impossible), but calculating risk and acting | |
decisively. Make mistakes of ambition and not mistakes of | |
sloth. Develop the strength to do bold things, not the strength | |
to suffer.” —NICCOLO MACHIAVELLI, The Prince |
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
# I wanted learn about Minitest and I saw a cool youtube video about creating a FizzBuzz class that required Minitest. It seemed like a # great introduction so I decided to try it for myself and do my own implementation here | |
#1st mkdir fizzbuzz to create folder/directory | |
#This is the main class which we are testing, put this code in a 'fizzbuzz.rb' ruby file | |
class FizzBuzz | |
def print(num) | |
if num.respond_to?(:each) |
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
Write a program for managing locker reservations at a hotel concierge desk. | |
Customers leave bags with the concierge, who then uses your program to determine | |
in which locker to place the bag. The program tells the concierge the number of | |
the locker in which to place the bag, and prints a ticket to give to the customer. | |
Upon return, the customer provides the ticket, and the concierge uses that to | |
look up the corresponding locker, retrieve the bag, and return it to the customer. | |
There are 1000 small lockers, 1000 medium sized lockers, | |
and 1000 large lockers (it’s a big Vegas hotel). You can assume that all | |
checked bags fit into one of these three sizes. The program should |
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
Writing coding interview questions hasn't made me rich. Maybe trading Apple stocks will. | |
I have an array stock_prices_yesterday where: | |
The indices are the time in minutes past trade opening time, which was 9:30am local time. | |
The values are the price in dollars of Apple stock at that time. | |
For example, the stock cost $500 at 10:30am, so stock_prices_yesterday[60] = 500. | |
Write an efficient algorithm for computing the best profit I could have made from 1 purchase and 1 sale of 1 Apple stock yesterday. | |
No "shorting"—you must buy before you sell. You may not buy and sell in the same time step (at least 1 minute must pass). |
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
You have an array of integers, and for each index you want to find the product of every integer except the integer at that index. | |
Write a function get_products_of_all_ints_except_at_index() that takes an array of integers and returns an array of the products. | |
For example, given: | |
[1, 7, 3, 4] | |
your function would return: | |
[84, 12, 28, 21] | |
by calculating: |