Skip to content

Instantly share code, notes, and snippets.

View aakashd's full-sized avatar

aakash dharmadhikari aakashd

View GitHub Profile
@aakashd
aakashd / gh_to_pt.rb
Last active August 29, 2015 13:58 — forked from rbrooks/gh_to_pt.rb
#!/usr/bin/env ruby
# Author: Russ Brooks, TelVue Corporation (www.telvue.com)
# Description: Migrates GitHub Issues to Pivotal Tracker.
# Dependencies: Ruby 1.9.2+
# GitHub API gem: https://github.com/peter-murach/github
# Pivtal Tracker gem: https://github.com/jsmestad/pivotal-tracker
# 1. Change the constants below accordingly for your project.
# 2. Change the options in list_repo() method for your GitHub project.
# 3. Change the options in stories.create() method accordingly.
@aakashd
aakashd / sample_action.html.erb
Last active August 29, 2015 14:01
how to include page specific javascript code after application.js
<div class='content'>
<!-- your application code, which requires some JS -->
</div>
<% content_for :javascript do %>
<script type="text/javascript">
$(function () {
$('th').tooltip();
});
</script>
# Gemfile
gem 'rails', '4.1.4'
gem 'pg'
gem 'sass-rails', '~> 4.0.3'
gem 'uglifier', '~> 2.4.0'
gem 'coffee-rails', '~> 4.0.1'
gem 'jquery-rails', '~> 3.0.4'
MC1 Product Type
Pharmacy electronics
Pharmacy medicines
Pharmacy foot care
Name Input Type Character Limit Operation
inseam length number create
size number create
side effects text 500 create
Strength Qty number create
Strength Unit dropdown create
number size number create
Text Side Effects text 500 create
Dropdown Skin Type dropdown create
Boolean Popular boolean create
Category Product Type Name Attribute 1 Attribute 2 Attribute 3 Operation
Personal Care Tablet Personal Theme 1 String Description Number Size Dropdown Skin Type create
Personal Care Tablet Personal Theme 2 String Description Dropdown Skin Type create
Personal Care Tablet Personal Theme 3 Number Size create
partial included in listing form
<p>
<% form.fields_for :address do |address_form| %>
<%= render :partial => '/addresses/address_form', :object => address_form %>
<% end %>
</p>
neighbourhood select in address form
class Address < ActiveRecord::Base
belongs_to :listing
belongs_to :neighbourhood
belongs_to :creator, :class_name => User, :foreign_key => 'creator_id'
belongs_to :updater, :class_name => User, :foreign_key => 'updater_id'
end
# == Schema Information
#
<p>
<%= address_form.label :street_1 %><br />
<%= address_form.text_field :street_1 %>
</p>
<p>
<%= address_form.label :street_2 %><br />
<%= address_form.text_field :street_2 %>
</p>
<p>
<%= address_form.label :landmark %><br />
SKU Operation Item Name Brand Name Manufacturer Product Type Product Description Parent/Child Parent SKU foobar_property Active Variation Theme Category Path 1 Category Path 2
dummy-1 create Himalaya Herbals Purifying Neem Face Wash Himalaya Himalaya Global Holdings Ltd foobar_product_type is a soap-free herbal formulation that clears impurities and helps clear pimples Parent 1 TRUE foobar_theme 2000 3000
dummy-2 create Himalaya Herbals Purifying Neem Face Wash 200ml Child dummy-1 2 TRUE
dummy-3 create Himalaya Herbals Purifying Neem Face Wash 500ml Child dummy-1 1 TRUE
dummy-4 create Himalaya Herbals Baby Soap (Honey and Milk) Himalaya Himalaya Global Holdings Ltd foobar_product_type is a herbal soap developed for baby's sensitive skin TRUE 2000