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(shop). | |
-author('Eduard Bondarenko <[email protected]>'). | |
-compile(export_all). | |
main(_) -> | |
io:format("Welcome to shop you need."). |
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
## application.rb | |
before_filter :subdomain_settings | |
def subdomain_settings | |
subdomains = request.host.split('.') | |
@is_admin = subdomains.first.match(/^admin-/) ? true : false | |
@domain = subdomains.first.gsub(/^admin-/,'') | |
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
# AV/base.rb | |
def render(options = {}, local_assigns = {}, &block) #:nodoc: | |
local_assigns ||= {} | |
"<!--DBG #{options[:layout]} #{options[:file]} #{options[:partial]} #{options[:text]}-->"+ | |
if options.is_a?(String) | |
ActiveSupport::Deprecation.warn( | |
"Calling render with a string will render a partial from Rails 2.3. " + | |
"Change this call to render(:file => '#{options}', :locals => locals_hash)." | |
) |
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
<html> | |
<head> | |
<script src="http://mapia.com.ua/api/0.9.0/mapiaapi.js?apikey=1c4ed601350edbc1e5a55fbafab5da8e"></script> | |
</head> | |
<body> | |
<div style="display:block; width:420px; height:314px"> | |
<div id="mapContainer" style="width:100%;height:100%"></div> | |
</div> | |
<script> | |
map = new Mapia('mapContainer'); |
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
get '/' do | |
haml :index | |
end | |
post '/unwind' do | |
@url, @unwound_url, @unwind_error = unwind(params[:url]) | |
haml :index | |
end | |
get '/unwind.json' do |
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
# SUPER DARING APP TEMPLATE 1.0 | |
# By Peter Cooper | |
# Link to local copy of edge rails | |
inside('vendor') { run 'ln -s ~/dev/rails/rails rails' } | |
# Delete unnecessary files | |
run "rm README" | |
run "rm public/index.html" | |
run "rm public/favicon.ico" |
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
#!/usr/bin/ruby | |
$KCODE='u' | |
require 'jcode' | |
require 'rubygems' | |
require 'bindata' | |
class NDSHeader < BinData::MultiValue | |
array :header, :type => :uint8, :initial_length => 0x68 |
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
/* This is a template command */ | |
CmdUtils.CreateCommand({ | |
name: "Yandex.Slovari", | |
icon: "http://lingvo.yandex.ru/favicon.ico", | |
homepage: "http://slovari.yandex.ru/", | |
author: { name: "Eduard Bondarenko", email: "[email protected]"}, | |
license: "GPL", | |
description: "Translate selection on yandex slovari", | |
help: "Input text for translation", | |
takes: {"word": noun_arb_text}, |
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
2009-02-10 10:27:52 EET LOG: statement: SELECT tablename | |
FROM pg_tables | |
WHERE schemaname IN (E'"$user"',E'public') | |
2009-02-10 10:27:52 EET ERROR: permission denied: "pg_ts_dict" is a system catalog | |
2009-02-10 10:27:52 EET STATEMENT: ALTER TABLE "news_categories" ENABLE TRIGGER ALL;ALTER TABLE "news_articles_categories" ENABLE TRIGGER ALL;ALTER TABLE "news_articles" ENABLE TRIGGER ALL;ALTER TABLE "taggings" ENABLE TRIGGER ALL;ALTER TABLE "tags" ENABLE TRIGGER ALL;ALTER TABLE "todos" ENABLE TRIGGER ALL;ALTER TABLE "user_addresses" ENABLE TRIGGER ALL;ALTER TABLE "users" ENABLE TRIGGER ALL;ALTER TABLE "vegetations" ENABLE TRIGGER ALL;ALTER TABLE "vertices_tmp" ENABLE TRIGGER ALL;ALTER TABLE "words" ENABLE TRIGGER ALL;ALTER TABLE "raw_roads" ENABLE TRIGGER ALL;ALTER TABLE "raw_stations" ENABLE TRIGGER ALL;ALTER TABLE "roles" ENABLE TRIGGER ALL;ALTER TABLE "raw_street_segments" ENABLE TRIGGER ALL;ALTER TABLE "roles_users" ENABLE TRIGGER ALL;ALTER TABLE "raw_streets" ENABL |
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
default: -b -r features/support/env.rb -r features/support/simple.rb -r features/step_definitions features/simple | |
selenium: -b -r features/support/env.rb -r features/support/enhanced.rb -r features/step_definitions features/enhanced | |
Then /^should be user "(\w+)" in system$/ do |login| | |
User.first(:conditions => {:login => login}).should_not be_nil | |
end | |
Then should be user "bob" in system # features/step_definitions/new_client_registration_steps.rb:9 |
OlderNewer