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
<script type="text/javascript"> | |
if(document.images) /* если доступен объект Image */ | |
{ | |
/* создаем объект - изображение. указывем размеры изображения */ | |
var pic1=new Image(); | |
/* путь к изображению */ | |
pic1.src="path-to/popup-back.png"; | |
} | |
</script> |
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
import sys | |
import os | |
try: | |
t = sys.argv[1] | |
u = sys.argv[2] | |
rnm = True if len(sys.argv) > 3 else False | |
fl_st = sys.argv[0] | |
fl_n = fl_st.rfind("\\") |
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
require 'formula' | |
class Phpunit < Formula | |
homepage 'http://www.phpunit.de/manual/current/en/index.html' | |
url 'http://pear.phpunit.de/get/phpunit.phar' | |
sha1 '88d4919ffc91c9aec8aea2b28e500d3e43e2b13b' | |
version 'HEAD' | |
def install | |
bin.install "phpunit.phar" => "phpunit" |
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
<script type="text/javascript"> | |
/* Скрипт для верхнего таймера с редиректом на свежий рейтинг */ | |
$(document).ready(function(){ | |
// Включим таймер. Необходимо, чтобы не редиректило при проблемах со скриптами. | |
$('#tagline-top-redirect-timer').data('timer', 'enable'); | |
// Рекурсивная фнукция реализующая редирект по таймеру. | |
function tagline_top_timer() | |
{ |
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 | |
class WordHelper | |
{ | |
/** | |
* Форма слова в зависимости от числа с количеством | |
* | |
* Пример использования: | |
* echo $n." ".plural($n, "письмо", "письма", "писем")." у Вас в ящике"; |
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
{ | |
"detect_indentation": false, | |
"ensure_newline_at_eof_on_save": true, | |
"fallback_encoding": "Cyrillic (Windows 1251)", | |
"font_face": "Menlo", | |
"font_size": 16.0, | |
"highlight_line": true, | |
"highlight_modified_tabs": true, | |
"ignored_packages": | |
[ |
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
$('.tagline-widget ').eq(n).append('<div class="vacancy">\ | |
<a href="%url%" target="_blank" class="vacancy__name tag-a">%name%</a>\ | |
<p class="vacancy__about tag-p">\ | |
<span class="vacancy__about__company">%company%</span>\ | |
<span class="vacancy__about__salary">%salary%</span>\ | |
</p>\ | |
</div>' | |
.replace("%name%", data[i].name) | |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<title>"Умный" поиск</title> | |
<link rel="stylesheet" type="text/css" href="style.css"> | |
<script type="text/javascript" src="jquery.js"></script> | |
<script type="text/javascript" src="smartSearch.js"></script> | |
</head> | |
<body> |
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
БЭМ (read: http://ru.bem.info/articles/bem-for-small-projects/) | |
Для имен классов используем БЭМ-поход | |
БЭМ разделяет классы на три группы: | |
Блок: основной корневой блок и стиль компонента | |
Элемент: внутренние части блока, может быть сколь угодно много | |
Модификатор: вариация, расширение блока или элемента | |
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
frontend (read: http://cssguidelin.es/) | |
Общее | |
— Ширина кода по возможности 80 символов, максимум — 120 символов | |
— Отступ 4 пробела (не табуляция!) |
OlderNewer