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
06/17/14 15:47:24:884 | [INFO] | | OOBE | DE | | | | 656 | *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=* | |
06/17/14 15:47:24:884 | [INFO] | | OOBE | DE | | | | 656 | Visit http://www.adobe.com/go/loganalyzer/ for more information | |
06/17/14 15:47:24:884 | [INFO] | | OOBE | DE | | | | 656 | *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=* | |
06/17/14 15:47:24:884 | [INFO] | | OOBE | DE | | | | 656 | *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=* | |
06/17/14 15:47:24:884 | [INFO] | | OOBE | DE | | | | 656 | START - Installer Session | |
06/17/14 15:47:24:884 | [INFO] | | OOBE | DE | | | | 656 | *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=* | |
06/17/14 15:47:24:884 | [INFO] | | OOBE | DE | | | | 656 | RIBS version: 8.0.0.15 | |
06/17/14 15:47:24:884 | [INFO] | | OOBE | DE | | | | 656 | Win OS version: 6.2.0.0 64 bit Type: 1 | |
06/17/14 15:47:24:884 | |
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 'csv' | |
require 'street_address' | |
require 'logger' | |
log = Logger.new(STDERR) | |
count = 0 | |
# puts CSV.generate(ARGV[1]) do |csv| | |
CSV.foreach(ARGV[0], :headers => true) do |row| | |
if (count == 0) |
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
module GeoHelper | |
def maxmind_locate | |
uri = URI("https://geoip.maxmind.com/geoip/v2.1/city/#{request.remote_ip}?pretty") | |
Net::HTTP.start(uri.host, uri.port, | |
:use_ssl => uri.scheme == 'https', | |
:verify_mode => OpenSSL::SSL::VERIFY_NONE) do |http| |
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
#config/boot.rb is loaded | |
require File.expand_path('../boot', __FILE__) | |
#reuquires all the railties (active model, active record, etc) | |
require 'rails/all' | |
if defined?(Bundler) | |
# If you precompile assets before deploying to production, use this line | |
#Bundler.require(*Rails.groups(:assets => %w(development test))) | |
Bundler.require(*Rails.groups(:assets => %w(development test))) if defined?(Bundler) |
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
subreddit Last Visited View all » | |
ambientmusic | |
Never +shortcut | |
Android | |
2014-09-14 +shortcut | |
androidapps | |
Never +shortcut | |
androiddev | |
2014-09-14 +shortcut | |
AndroidGaming |
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
sudo apt-get -y update | |
sudo apt-get install -y git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties libffi-dev git rbenv | |
git clone https://github.com/sstephenson/rbenv.git ~/.rbenv | |
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc | |
echo 'eval "$(rbenv init -)"' >> ~/.bashrc | |
type rbenv | |
git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build | |
rbenv install 2.2.0 | |
sudo apt-get -y install nodejs | |
gem update --system |
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
@brand1 = params[:brand][:name] | |
@model = params[:brand][:models_attributes]["0"]["name"] | |
@submodel = params[:brand][:models_attributes]["0"]["submodels_attributes"]["0"]["name"] | |
@style = params[:brand][:models_attributes]["0"]["submodels_attributes"]["0"]["styles_attributes"]["0"]["name"] | |
a = Brand.find_or_create_by_name(@brand1) | |
b = Model.find_or_create_by_name(@model, :brand_id => a.id) | |
c = Submodel.find_or_create_by_name(@submodel, :model_id => b.id) | |
d = Style.new(:name => @style, :submodel_id => c.id) | |
d.save |
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
@brand1 = params[:brand][:name] | |
@model = params[:brand][:models_attributes]["0"]["name"] | |
@submodel = params[:brand][:models_attributes]["0"]["submodels_attributes"]["0"]["name"] | |
@style = params[:brand][:models_attributes]["0"]["submodels_attributes"]["0"]["styles_attributes"]["0"]["name"] | |
a = Brand.find_or_create_by_name(@brand1) | |
b = Model.find_or_create_by_name(@model, :brand_id => a.id) | |
c = Submodel.find_or_create_by_name(@submodel, :model_id => b.id) | |
d = Style.new(:name => @style, :submodel_id => c.id) | |
d.save |
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
models/product.rb | |
def category_name category.try(:name) end def category_name=(name) self.category = Category.find_or_create_by_name(name) if name.present? end def category_name | |
category.try(:name) | |
end | |
def category_name=(name) | |
self.category = Category.find_or_create_by_name(name) if name.present? | |
endapp/assets/javascripts/application.js | |
//= require jquery-ui //= require jquery-uiapp/assets/javascripts/products.js.coffee | |
jQuery -> $('#product_category_name').autocomplete source: $('#product_category_name').data('autocomplete-source') jQuery -> |
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
models/product.rb | |
def category_name category.try(:name) end def category_name=(name) self.category = Category.find_or_create_by_name(name) if name.present? end def category_name | |
category.try(:name) | |
end | |
def category_name=(name) | |
self.category = Category.find_or_create_by_name(name) if name.present? | |
endapp/assets/javascripts/application.js |
OlderNewer