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
# Install postgres 9.2 | |
vi /etc/apt/sources.list.d/pgdg.list | |
# Add lines below | |
deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main | |
# Run and Install postgres 9.2 | |
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - | |
sudo apt-get update | |
sudo apt-get install postgresql-9.2 |
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
Sencha Touch iconCls Values | |
--------------------------- | |
action | |
add | |
arrow_down | |
arrow_left | |
arrow_right | |
arrow_up | |
bookmarks |
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
namespace :settings do | |
desc 'Setup settings.' | |
task :setup do | |
run "mkdir -p #{shared_path}/config/settings" | |
put File.read('config/settings.local.yml'), "#{shared_path}/config/settings.yml" | |
put File.read('config/settings/staging.local.yml'), "#{shared_path}/config/settings/staging.yml" | |
put File.read('config/settings/production.local.yml'), "#{shared_path}/config/settings/production.yml" | |
put File.read('config/s3.local.yml'), "#{shared_path}/config/s3.yml" |
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
#routes | |
namespace :hq do | |
scope "(:locale)", :locale => /en|tr|ru/ do | |
resources :pages | |
end | |
end | |
#Page model | |
def to_param | |
"#{id}-#{title.present? ? title.parameterize : ''}" |
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
$.getJSON "/locations/districts?city_id=" + city_id + "&callback=?", (data) -> | |
$.each data, (i, item) -> | |
$(".register_temp_invoice_info_delivery_district_id").append "<option value=" + item.id + ">" + item.name + "</option>" |
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
namespace :dev do | |
# Just run development env | |
# This code run insert seed and agency data | |
# A simple trick to over migration problem | |
task :setup => [:environment] do | |
raise 'Nah, You are at production' if Rails.env.production? | |
Rake::Task['dev:kill_postgres_connections'].execute | |
Rake::Task['db:drop'].execute | |
Rake::Task['db:create'].execute | |
Rake::Task['db:migrate'].execute |
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
$(".booking_form").html("<%= escape_javascript( render(:partial => "booking_form") ) %>"); |
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
config.action_mailer.default_url_options = { :host => 'muhammet.com' } | |
config.action_mailer.delivery_method = :smtp | |
config.action_mailer.smtp_settings = { | |
:address => "smtp.gmail.com", | |
:port => 587, | |
:domain => 'gmail.com', | |
:user_name => '[email protected]', | |
:password => 'ab2014', | |
:authentication => 'plain', | |
:enable_starttls_auto => true |
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
require 'spec_helper' | |
describe Product do | |
let(:product) { FactoryGirl.build :product } | |
describe 'attributes' do | |
# Validations | |
it { expect(product).to validate_presence_of :name } | |
it { expect(product).to validate_presence_of :description } |
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
client = Savon::Client.new(wsdl: "http://ws.ttmesaj.com/service1.asmx?WSDL") | |
message = { | |
"username" => "kullanici adi", | |
"password" => "sifre", | |
"numbers" => "Numara", | |
"message" => "Deneme", | |
"origin" => "origin", | |
"sd" => "", | |
"ed" => "" } | |
response = client.call( :send_single_sms, message: message) |