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
- function pDate() { | |
- return new Date().getTime(); | |
- } | |
doctype html | |
html(lang="ru") | |
head | |
meta(charset="utf-8") | |
title TITLE |
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
<?php | |
$address="[email protected]"; | |
$subj="Mail Test"; | |
$text=date("D, d.m.y, H:i"); | |
$head="Content-type:text/plain; \n\t charset=windows-1251;"; | |
echo "Sending to $address"; | |
mail($address, $subj, $text, $head); | |
echo "Ok, it works"; |
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
.yourclass div { | |
all: unset; /* сделать все свойства по-умолчанию */ | |
} |
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
Full: https://tympanus.net/codrops/2013/04/17/background-slideshow/ | |
$(document).ready(function () | |
{ | |
$(function() { | |
//bgSlides.init(); | |
}); | |
var bgSlides = (function() { | |
var $topslider = $('.slides'); |
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
<?php | |
/******************************************************* | |
* Only these origins will be allowed to upload images * | |
******************************************************/ | |
$accepted_origins = array("http://localhost", "http://192.168.1.1", "http://example.com"); | |
/********************************************* | |
* Change this line to set the upload folder * | |
*********************************************/ | |
$imageFolder = "images/"; |
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
rem Преобразовывает все изображения в 1024*768 и 285х200 + оптимизирует их | |
rem Нужны программы: ImageMagick (https://www.imagemagick.org/script/download.php) и jpegtran (http://jpegclub.org/jpegtran/) | |
for %%f in (*.jpg) do ( | |
magick %%f -resize "285x200^" -gravity center -extent 285x200 "%%~nf-thumb.jpg" | |
jpegtran -copy none -optimize -progressive -outfile "%%~nf-thumb.jpg" "%%~nf-thumb.jpg" | |
magick %%f -resize "1024x768<" -gravity center -extent 1024x768 "%%~nf-view.jpg" | |
jpegtran -copy none -optimize -outfile "%%~nf-view.jpg" "%%~nf-view.jpg" | |
) |
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
// Generate class helpers for size properties such as margin, padding | |
// Usage : | |
// marginer(0.5, 3, 0.5) | |
// .mt3 will then add margin-top: 2.5rem; to the element, | |
// and so on for each side, from 0.5rem to 2,5rem with a 0.5rem step. | |
paddinger(min, max, step, counter=0) | |
.pt{counter} | |
padding-top (min rem) | |
.pb{counter} |
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
<? | |
if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die(); | |
if (!is_array($arResult["arMap"]) || count($arResult["arMap"]) < 1) | |
return; | |
$resArr = []; | |
$tmpArr = []; | |
foreach($arResult["arMap"] as $index => $arItem){ |
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
<? | |
if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die(); | |
$news = CIBlockElement::GetList(["SORT"=>"ASC"],['IBLOCK_ID'=>13]); | |
$fp = fopen('dump_news.txt', 'a'); | |
while($ob = $news->GetNextElement()) | |
{ | |
$arFields = $ob->GetFields(); |
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
<style> | |
body { | |
margin: 0; | |
padding: 25px; | |
font-family: sans-serif; | |
} | |
/* Option */ | |
.option { |
OlderNewer