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 SDB | |
class Database | |
@@connections = {} | |
def self.define_connection(db_name, &init) | |
@@connections[db_name] = init | |
##Storing db config in proc. | |
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
[186] pry(main)> print data[105*66..106*66].unpack("a50qq") | |
["Day 106\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", 106, 1334433600]=> nil | |
[187] pry(main)> print data[106*66..107*66].unpack("a50qq") | |
["ay 107\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00k", -4611686018427387904, 4899916394584312616]=> nil | |
[188] pry(main)> |
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 class="i-ua_js_yes i-ua_css_standart m-border-radius" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:x="http://www.yandex.ru/xscript"><head><meta content="text/html; charset=utf-8" http-equiv="Content-Type"><meta content="true" name="MSSmartTagsPreventParsing"><meta content="IE=EmulateIE7, IE=edge" http-equiv="X-UA-Compatible"><!--[if gt IE 7]><!--><link href="//yandex.st/weather/1.1.68.1/pages/common/_common.css" rel="stylesheet"><!--<![endif]--><!--[if lt IE 8]><link rel=stylesheet href="http://yandex.st/weather/1.1.68.1/pages/common/_common.ie.css"><![endif]--><link href="//yandex.st/lego/_/p2hHn1BzWL7kJemxd7YIBrA98ho.ico" rel="shortcut icon"><title>Прогноз погоды: Санкт-Петербург (Россия) - Яндекс.Погода</title><link href="/opensearch.xml" title="Яндекс.Погода" type="application/opensearchdescription+xml" rel="search"></head><body class="b-page"><div class="b-head-gradient b-t_c_16"><div class="b-head-gradient__i"></div></div><i class="b-statcounter"><i style="background:url(//www.tns-counter.ru/V |
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
<!DOCTYPE html> | |
<html lang="ru"> | |
<head> | |
<title>Sitesaver</title> | |
<%= stylesheet_link_tag "application", :media => "all" %> | |
<%= javascript_include_tag "application" %> | |
<%= csrf_meta_tags %> | |
</head> | |
<body> |
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
http://flat.petroarenda.ru/obj/103 | |
http://flat.petroarenda.ru/obj/569 | |
http://flat.petroarenda.ru/obj/458 | |
http://flat.petroarenda.ru/obj/357 |
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
<% current = @resource_contents[ind] %> | |
<% prev = (ind != 0) ? @resource_contents[ind - 1] : nil %> | |
unless prev | |
if current.show | |
<%= render "statistics/content_chunk" %> | |
else | |
<tr> | |
<td colspan="5"> | |
<div id="accordion<%= accordion_counter.to_s %>" class="accordion"> |
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
class Resource < ActiveRecord::Base | |
belongs_to :host | |
has_many :resource_statuses | |
has_many :resource_contents | |
attr_accessible :path, :period, :csspaths | |
validates_presence_of :path, :period, :csspaths | |
before_save do |resource| | |
csspaths = resource.csspaths.split(",") | |
csspaths.delete("") |
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
<!DOCTYPE html> | |
<html lang="ru"> | |
<head> | |
<title>Sitesaver</title> | |
<link href="/assets/application.css?body=1" media="all" rel="stylesheet" type="text/css" /> | |
<link href="/assets/home.css?body=1" media="all" rel="stylesheet" type="text/css" /> | |
<link href="/assets/hosts.css?body=1" media="all" rel="stylesheet" type="text/css" /> | |
<link href="/assets/resources.css?body=1" media="all" rel="stylesheet" type="text/css" /> | |
<link href="/assets/statistics.css?body=1" media="all" rel="stylesheet" type="text/css" /> | |
<script src="/assets/jquery.js?body=1" type="text/javascript"></script> |
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 Periodic | |
class HostProbeJob | |
def initialize(host) | |
@host = host | |
end | |
def perform | |
stime = Time.current.to_f |
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
$(document).ready(function() { | |
$('iframe', top.document).load(function() { | |
// this.style.height = this.contentWindow.document.body.offsetHeight + 'px'; //autoheight | |
var nodes = $('#wizard-controller > input').attr('value').split(','); | |
var iframeDoc = window.frames[0].document; | |
var list = $(iframeDoc).contents().find('*'); | |
setNodesCounter(); |
NewerOlder