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
mike@rbci:~$ psql -U postgres | |
psql (9.0.3) | |
Type "help" for help. | |
postgres=# update pg_database set datallowconn = TRUE where datname = 'template0'; | |
UPDATE 1 | |
postgres=# \c template0 | |
You are now connected to database "template0". | |
template0=# update pg_database set datistemplate = FALSE where datname = 'template1'; | |
UPDATE 1 |
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
Pending: | |
IdentityCard add some examples to (or delete) /home/vmolokov/Projects/pathfinder-emulator/spec/models/identity_card_spec.rb | |
# No reason given | |
# ./spec/models/identity_card_spec.rb:4 | |
Address add some examples to (or delete) /home/vmolokov/Projects/pathfinder-emulator/spec/models/address_spec.rb | |
# No reason given | |
# ./spec/models/address_spec.rb:4 | |
DrivingLicence add some examples to (or delete) /home/vmolokov/Projects/pathfinder-emulator/spec/models/driving_licence_spec.rb | |
# No reason given | |
# ./spec/models/driving_licence_spec.rb:4 |
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
gem install rvm passenger |
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
Failures: | |
1) SlotsController#create when user logged in if slot on this date is free when pass correct params | |
Failure/Error: it { should redirect_to(slot_url(assigns(:slot).unique_key)) } | |
Expected response to be a <:redirect>, but was <422> | |
# ./spec/controllers/slots/slots_controller_create_spec.rb:74:in `block (6 levels) in <top (required)>' | |
2) SlotsController#show when user logged in and pass correct slot id response | |
Failure/Error: its(:response) { should be_success } | |
expected success? to return true, got false | |
# ./spec/controllers/slots/slots_controller_show_spec.rb:24:in `block (5 levels) in <top (required)>' | |
3) Slots::PrintController#show when user logged in and pass correct slot id response |
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 'barby' | |
require 'barby/outputter/png_outputter' | |
require 'barby/barcode/qr_code' | |
barcode = Barby::QrCode.new('https://web.staging.er.molokov.info/slots/adb67c2733bb23c81db26da31dbe4212699bb88dbc0157e17ee6cead62cbc89c5') | |
File.open('res.png', 'wb') do |f| | |
f.puts barcode.to_png | |
end |
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
# install git | |
sudo apt-get update | |
sudo apt-get install make gcc g++ zlib1g-dev curl libssl-dev apache2-utils git-core -y | |
# download the Node source, compile and install it | |
git clone https://github.com/joyent/node.git | |
cd node | |
git fetch --tags | |
git checkout v0.6.10 | |
./configure | |
make |
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
export VERSION=v0.2.0 | |
mkdir $VERSION | |
cd $VERSION | |
git init | |
git remote add origin git@github.com:Imomoi/queue.git | |
git fetch --tag | |
git checkout $VERSION |
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{:method=>'post', :url=>line_items_path(:product_id => @prod)} | |
.shoping_cart_col2 | |
%input.cart_box{:name => 'item_quantity', :type => "text", :value => "1"} | |
.shoping_cart_col3 | |
%button{:type=>'submit'}Add To Cart |
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{:method=>'post'} | |
.shoping_cart_col2 | |
%input.cart_box{:name => 'item_quantity', :type => "text", :value => "1"} | |
%button{:type=>'submit', :value=>'OK'} |
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 request_reg_exp | |
return @_reg_exp if @_reg_exp | |
request_type = 'GET' | |
request_protocol = '(http:\/\/)?' | |
server_name = '([\d\.\w-]+)?' | |
server_port = ':?(\d+)?' | |
request_address = '([\w\d\.\/]+)' | |
request_parameters = '\??(.*)?' | |
http_version = 'HTTP\/1\.1' |
NewerOlder