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
sudo apt-get update | |
sudo apt-get install -y vim git curl wget unzip zip gcc build-essential make | |
sudo apt-get install software-properties-common | |
curl -O http://vestacp.com/pub/vst-install.sh | |
bash vst-install.sh --nginx yes --apache yes --phpfpm no --named yes --remi yes --vsftpd yes --proftpd no --iptables yes --fail2ban yes --quota no --exim yes --dovecot yes --spamassassin no --clamav no --softaculous no --mysql yes --postgresql no |
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
$('button[data-popup]').click(function(){ | |
$('.popup[data-popup="' + $(this).data('popup') + '"]').fadeIn('fast'); | |
}); | |
$('.popup .close').click(function() { | |
$(this).parent().parent().fadeOut('fast'); | |
}); | |
$( '.popup' ).mousedown(function(e) { | |
if (!$(e.target).closest('.window').length ) { |
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 { |
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
<? | |
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
// 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
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
<?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
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
.yourclass div { | |
all: unset; /* сделать все свойства по-умолчанию */ | |
} |
NewerOlder