First add your twitter username and password. Then server.rb and once it's started open websocket.html in your browser. You should see some tweets appear. If not take a look at the javascript console.
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
obj = | |
prebook: (variant) -> | |
vid = "&variant_id=#{ results.selectedTab }-#{ variant.attr('data-index') }" | |
@abort() | |
@variant = variant | |
@prebooking = $('<div class="prebooking-state"><h4 class="progress">Проверяем доступность</h4></div>') | |
@prebooking.appendTo variant.closest('.offer').addClass('prebooking') | |
@request = $.ajax | |
url: "/booking/preliminary_booking?#{ variant.attr('data-booking') }#{ vid }" |
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
#!/usr/bin/env ruby | |
def evidence message | |
return unless $! | |
$!.message << ' (while: ' << message.inspect << ')' | |
raise | |
end | |
def flaky x | |
5/x |
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
def pnr_commit_really_hard | |
yield | |
result = pnr_commit_and_retrieve | |
# закоммитить такое не удастся. надо повторять | |
if result.message == "SIMULTANEOUS CHANGES TO PNR - USE WRA/RT TO PRINT OR IGNORE" | |
pnr_ignore_and_retrieve | |
yield | |
result = pnr_commit_and_retrieve | |
end | |
# ER;ER трюк - двойной коммит для обхода ворнингов |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> | |
<soap:Header xmlns="http://webservices.amadeus.com/definitions"> | |
<SessionId>00CIZ26MWK|3</SessionId> | |
</soap:Header> | |
<soap:Body> | |
<Fare_PricePNRWithBookingClassReply xmlns="http://xml.amadeus.com/TPCBRR_07_3_1A"> | |
<applicationError> | |
<applicationErrorInfo> | |
<applicationErrorDetail> |
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
# -*- coding: utf-8 -*- | |
require 'active_support' | |
require 'active_support/core_ext/string/multibyte' | |
require 'traviata/active_record_ext'#почему то из инициалайзера не подключается, вылезает undefined method `has_cases_for' | |
require 'every' | |
require 'russian' | |
$KCODE = 'u' | |
class Completer | |
attr_reader :updated_at |
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
<xsl:stylesheet version="1.0" | |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | |
xmlns:r="http://xml.amadeus.com/FMPTBR_09_1_1A" | |
exclude-result-prefixes="r" | |
> | |
<xsl:output indent="yes" /> | |
<xsl:template match="text()" /> | |
<!-- возвращает неконформный xml документ - несколько roots. "лес" --> |
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
%xsl:stylesheet{ "xmlns:r" => "http://xml.amadeus.com/FMPTBR_09_1_1A", :version => "1.0", "xmlns:xsl" => "http://www.w3.org/1999/XSL/Transform" } | |
%xsl:output( indent="yes" )/ | |
%xsl:template( match="/" ) | |
%flights | |
%xsl:apply-templates( select="//r:flightInformation" )/ | |
%xsl:template( match="r:flightInformation" ) | |
%flight | |
%operating_carrier_iata | |
%xsl:value-of( select="r:companyId/r:operatingCarrier" )/ | |
%marketing_carrier_iata |
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
<tr class="<%= segment_counter == 0 ? 'ow' : 'rt' %>"> | |
<% if variant.common_carrier && variant.segments.length > 1 %> | |
<% if segment_counter == 0 %> | |
<td rowspan=<%= variant.segments.length %> class="extra g-middle"> | |
<p style="background:url(<%= segment.marketing_carrier.icon_url %>) no-repeat"><%= segment.marketing_carrier_name %> | |
<% end %> | |
<% else %> | |
<td class="extra"> | |
<p style="background:url(<%= segment.marketing_carrier.icon_url %>) no-repeat"><%= segment.marketing_carrier_name %> | |
<% end %> |
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
package LE; | |
use strict; | |
use integer; | |
use locale; | |
use CL; | |
use Conf; | |
############################################################################### | |
# helper variables and functions first |