var m = new Backbone.Model();
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
<form action="<%= @pay_desc['mrh_url'] %>" method="post"> | |
<input type=hidden name=MrchLogin value="<%= @pay_desc['mrh_login'] %>"> | |
<input type=hidden name=OutSum value="<%= @pay_desc['out_summ'] %>"> | |
<input type=hidden name=InvId value="<%= @pay_desc['inv_id'] %>"> | |
<input type=hidden name=Desc value="<%= @pay_desc['inv_desc'] %>"> | |
<input type=hidden name=SignatureValue value="<%= @pay_desc['crc'] %>"> | |
<input type=hidden name=Shp_item value="<%= @pay_desc['shp_item'] %>"> | |
<input type=hidden name=IncCurrLabel value="<%= @pay_desc['in_curr'] %>"> | |
<input type=hidden name=Culture value="<%= @pay_desc['culture'] %>"> | |
<input type=submit value='Оплатить'> |
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
.ui-tabs-nav li a {background: url('tabs.gif');text-indent: -100000px; display: block; width: 44px;} | |
.ui-tabs-nav li a#finaceAdvisorTab {background-position:0px 0px; height: 130px;} | |
.ui-tabs-nav li a#personalBrokerTab {background-position:0px -130px; height: 130px;} | |
.ui-tabs-nav li a#vipBrokerTab {background-position:0px -260px; height: 90px;} | |
.ui-tabs-nav li a#voiceOrderTab {background-position:0px -350px; height: 130px;} | |
.ui-tabs-nav li a#myFilialTab {background-position:0px -480px; height: 90px;} | |
.ui-tabs-nav li a#finaceAdvisorTab:hover, | |
.ui-tabs-nav li.ui-tabs-selected a#finaceAdvisorTab {background-position:44px 0px; height: 130px;} | |
.ui-tabs-nav li a#personalBrokerTab:hover, |
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
/* | |
@date 05/31/2011 | |
@class Backbone.Subset | |
@name Backbone Subset | |
@desc | |
Implements an imaginary subset of a Backbone Collection (as superset) | |
*/ | |
// Extend the default Backbone.Collection |
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
activeRequests = [] | |
Backbone._sync = Backbone.sync | |
Backbone.sync = (method, model, options) -> | |
asyncToken = Backbone._sync.apply(this,arguments) | |
asyncToken.then () -> | |
activeRequests = _.without activeRequests, asyncToken | |
if activeRequests.length == 0 then console.log "LOADING COMPLETE" | |
if activeRequests.length == 0 | |
console.log "START LOADING" |
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
#!/bin/bash | |
for i in `find . -name '*.erb'` ; do | |
html2haml $i `echo $i | sed 's/\.erb/\.haml/'` | |
done | |
find . -name '*.erb' -exec rm \{\} \; |
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 'rubygems' | |
require 'stemmer' | |
require 'classifier' | |
class LedeClassifier | |
attr :classifier | |
def initialize(sections, n) | |
@classifier = Classifier::Bayes.new(*sections) |
In the seemlingly endless search for the actual correct and easy way to deploy a Rails app, we have tried several ways. We tried out using Apache2 and running a cluster of Thin servers. With the built in threading of Puma we decided to use it with Nginx.
- Create new server
- Login to new server
- ssh root@IPaddress (you can also use the domain name if you have the DNS setup already)
- accept the RSA key
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
def update_skus | |
s = Sku.all(:conditions => {:code => 30853, :deleted => 0}).first; (s.present? ? puts( 'present') : Sku.create(:code => '30853',:name => 'K6G52S(X)/R', :serial => 'K6G52S(X)/R'.upcase.delete(" .:,.-()~!@$%^&#*_+?;/|\[]{}`'"+'"').gsub("(",""),:brand_id => 1, :sku_category_id => 2, :business => 0)) | |
s = Sku.all(:conditions => {:code => 30863, :deleted => 0}).first; (s.present? ? puts( 'present') : Sku.create(:code => '30863',:name => 'K6C51(W)/R', :serial => 'K6C51(W)/R'.upcase.delete(" .:,.-()~!@$%^&#*_+?;/|\[]{}`'"+'"').gsub("(",""),:brand_id => 1, :sku_category_id => 2, :business => 0)) | |
s = Sku.all(:conditions => {:code => 30874, :deleted => 0}).first; (s.present? ? puts( 'present') : Sku.create(:code => '30874',:name => 'K6E11(W)/R', :serial => 'K6E11(W)/R'.upcase.delete(" .:,.-()~!@$%^&#*_+?;/|\[]{}`'"+'"').gsub("(",""),:brand_id => 1, :sku_category_id => 2, :business => 0)) | |
s = Sku.all(:conditions => {:code => 30875, :deleted => 0}).first; (s.present? ? puts( 'present') : Sku.crea |
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
skus = [] | |
s = Sku.all(:conditions => {:code => 87843, :deleted => 0}).first; (s.present? ? puts( 'present') : Sku.create(:code => '87843',:name => 'PC 604 (WH) /HA', :serial => 'PC 604 (WH) /HA'.upcase.delete(" .:,.-()~!@$%^&#*_+?;/|\[]{}`'"+'"').gsub("(",""),:brand_id => 2, :sku_category_id => 16, :business => 1)) | |
s = Sku.all(:conditions => {:code => 87784, :deleted => 0}).first; (s.present? ? puts( 'present') : Sku.create(:code => '87784',:name => '7HPC 631 X /HA', :serial => '7HPC 631 X /HA'.upcase.delete(" .:,.-()~!@$%^&#*_+?;/|\[]{}`'"+'"').gsub("(",""),:brand_id => 2, :sku_category_id => 16, :business => 1)) | |
s = Sku.all(:conditions => {:code => 87848, :deleted => 0}).first; (s.present? ? puts( 'present') : Sku.create(:code => '87848',:name => '7HPC 604 X /HA', :serial => '7HPC 604 X /HA'.upcase.delete(" .:,.-()~!@$%^&#*_+?;/|\[]{}`'"+'"').gsub("(",""),:brand_id => 2, :sku_category_id => 16, :business => 1)) | |
s = Sku.all(:conditions => {:code => 93793, :deleted => 0}).first; (s.present? ? puts( |