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 | |
require 'rubygems' | |
require 'open-uri' | |
require 'nokogiri' | |
current_uri = 'http://ruby.railstutorial.org/chapters/beginning#top' | |
next_uri = true | |
depth = 13 | |
head = <<HTML |
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
03-23 22:47:08.233: ERROR/AndroidRuntime(307): FATAL EXCEPTION: main | |
java.lang.RuntimeException: Unable to start activity ComponentInfo{ru.alvik/ru.alvik.AvailabilityListActivity}: android.view.InflateException: Binary XML file line #42: Error inflating class <unknown> | |
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663) | |
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679) | |
at android.app.ActivityThread.access$2300(ActivityThread.java:125) | |
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033) | |
at android.os.Handler.dispatchMessage(Handler.java:99) | |
at android.os.Looper.loop(Looper.java:123) | |
at android.app.ActivityThread.main(ActivityThread.java:4627) | |
at java.lang.reflect.Method.invokeNative(Native Method) |
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
<html> | |
<head> | |
<script type="text/javascript"> | |
var asproEvents = new function(){ | |
var myWatchers = new Array(); | |
this.addEventListener = function(watcher) { | |
console.log(typeof watcher); | |
} | |
this.raiseEvent = function(eventId) { |
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
<?php | |
//событие подмены нужной цены для покупки услуг | |
AddEventHandler("catalog", "OnGetOptimalPrice", 'OnGetOptimalPriceHandler'); | |
function OnGetOptimalPriceHandler($productID) | |
{ | |
//получаем id инфоблока покупаемого товара. Если это услуга, то подменяем цену. | |
$db_iblock = CIBlockElement::GetList(array(), array("ID" => $productID), false, false, array("IBLOCK_ID")); | |
$iblock = $db_iblock->Fetch(); | |
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
#!/bin/bash | |
# Performs a git rm on every deleted file. | |
deletion_list=$(git status | grep deleted: | cut -c 15-) | |
for file in $deletion_list; do | |
git rm --ignore-unmatch $file | |
done |
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
find /www/ -mindepth 1 -maxdepth 1 -type d '!' -exec test -e "{}/robots.txt" ';' -print0 | sudo xargs -0 -I target_folder cp /www/0default/robots.txt target_folder/ --preserve=mode,ownership |
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
#!/bin/bash | |
result_file=$(mktemp -t "check_robots_final_XXXXX") | |
echo "# Checking servers..." | |
# Need to remove the Windows file endings | |
sites_file=$(mktemp -t "sites_XXXXXX") | |
sed 's/^M$//' /www/sitechecker/sites.txt > $sites_file |
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
#!/bin/bash | |
_file=$(mktemp -t "check_robots_internal_XXXXXX") | |
find /www/ -maxdepth 2 -name robots.txt | xargs grep "^[^#]*Disallow: /\s*$" -L > $_file | |
# First, try to copy the default robots.txt to all the dirs missing it | |
find /www/ -mindepth 1 -maxdepth 1 -type d '!' -exec test -e "{}/robots.txt" ';' -print0 | xargs -0 -I target_folder cp /www/0default/robots.txt target_fo | |
# If it somehow failed for some of the folders, then report | |
find /www/ -mindepth 1 -maxdepth 1 -type d '!' -exec test -e "{}/robots.txt" ';' -print >> $_file | |
if [ -s "$_file" ] |
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
<? | |
if (CModule::IncludeModule("iblock")) { | |
$res = CIBlockElement::GetList(array(), array('IBLOCK_ID'=>23, 'ACTIVE'=>'Y'), false, false, array('NAME', 'ID', 'IBLOCK_ID', 'PROPERTY_FLAT_NUMBER')); | |
//$arElement = $res->Fetch(); | |
//echo '<pre>'; var_dump($arElement); echo '</pre>'; | |
while($arElement = $res->GetNext()) { | |
preg_match('(\d+)', ($arElement['NAME']), $matches); | |
$flatNumber = null; | |
if(count($matches) > 0) { | |
$flatNumber = intval($matches[0]); |
OlderNewer