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
$10 iTunes Gift Card | |
product = Spree::Product.find 11666 | |
variant = Spree::Variant.where(:product_id => product.id).first | |
line_items = Spree::LineItem.where(:variant_id => 11622).pluck(&:id) | |
RewardDelivery.where(:reward_id => line_items) | |
$5 Claire's Gift Card | |
product = Spree::Product.find 11689 |
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
# Make sure you do this from time to time: | |
sudo apt-get update && sudo apt-get upgrade -y | |
# Here are the actual packages (feel free to contribute): | |
sudo apt-get install build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev nodejs libssl-dev libreadline6-dev libreadline-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev ncurses-term automake libtool bison subversion libcurl4-openssl-dev mysql-client mysql-server postgresql postgresql-contrib imagemagick libmagickwand-dev apache2-mpm-prefork apache2-prefork-dev libapr1-dev libaprutil1-dev redis-server vim -y | |
# Make default editor vim :) | |
echo "export EDITOR=vim" >> ~/.bashrc | |
# Install RVM |
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
body{-webkit-animation: spin 30s linear infinite;} | |
p:before {content: "Code in Ruby! ";} | |
body, p, body p, body div p {font-family: 'Comic Sans MS', cursive !important;} | |
html {-webkit-animation: rainbow 8s infinite;} | |
@-webkit-keyframes blur { | |
0% { -webkit-filter: blur(0px); } | |
49% { -webkit-filter: blur(0px); } | |
50% { -webkit-filter: blur(1px); } | |
51% { -webkit-filter: blur(0px); } | |
100% { -webkit-filter: blur(0px); } |
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 CommonSteps | |
module Login | |
extend ActiveSupport::Concern | |
def create_regular_user | |
regular_user = FactoryGirl.create(:user) | |
end | |
def create_refinery_user | |
FactoryGirl.create(:refinery_user) |
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
def self.is_breaking_news? object | |
where("breaking_newsable_type = ? AND breaking_newsable_id = ?", object.class.to_s, object.id).first | |
end |