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
import { push } from 'connected-react-router'; | |
import { bindActionCreators } from 'redux'; | |
const mapDispatchToProps = dispatch => | |
bindActionCreators( | |
{ | |
changePage: () => push('/url-to-another-page') | |
}, | |
dispatch | |
); |
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
import multer from 'multer' | |
import passportManager from '../../config/passport' | |
import fs from 'fs' | |
import gm from 'gm' | |
import mime from 'mime' | |
import 'array-foreach-async' | |
const storage = multer.diskStorage({ | |
destination: function (req, file, cb) { | |
const { params: { folder, subfolder } } = req |
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
.image-down-arrows span{ | |
position: relative; | |
display: block; | |
width: 3px; | |
height: 8rem; | |
background-color: #fff; | |
animation: scrolldown 3.5s infinite; | |
} | |
@keyframes scrolldown { |
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
.element { | |
-webkit-animation: shake; | |
animation: shake; | |
-webkit-animation-iteration-count: infinite; | |
animation-iteration-count: infinite; | |
-webkit-animation-duration: 4s; | |
animation-duration: 4s; | |
-webkit-animation-timing-function: cubic-bezier(0.36, 0.07, 0.19, 0.97); | |
animation-timing-function: cubic-bezier(0.36, 0.07, 0.19, 0.97); | |
-webkit-animation-delay: 4s; |
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
var gulp = require('gulp'); | |
var responsive = require('gulp-responsive'); | |
var gulp = require('gulp'); | |
var $ = require('gulp-load-plugins')(); | |
gulp.task('images', function () { | |
return gulp.src('src/images/**/*') | |
.pipe($.responsive({ | |
'**/*.{jpg,jpeg,png}': [ | |
{ |
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 Upstair { | |
constructor(options={}) { | |
this.duration = options.duration || 350 | |
this.callback = options.callback || ((f) => f) | |
this.scrollStartHeight = options.scrollStartHeight || 100 | |
this.btnColor = options.btnColor || '#444' | |
this.btnStrokeWidth = options.btnStrokeWidth || 2 | |
this.stickySelector = options.stickySelector || null | |
this.html = options.html || this.getDefaultBtnHtml() | |
this.defaultStyle = { |
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 require( $_SERVER[ "DOCUMENT_ROOT" ] . "/bitrix/modules/main/include/prolog_before.php" ); | |
use Bitrix\Main\Loader; | |
/** | |
* Вернет массив файлов в директории, для любой вложенности | |
* | |
* @param $dir | |
* @param array $results | |
* @return array |
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 | |
ini_set('display_errors', 1); | |
error_reporting(E_ALL); | |
set_time_limit(0); | |
define('XML_DIR', 'xml'); | |
define('UPLOAD_DIR', 'upload_images'); | |
define('AVITO_FID', 'https://autoload.avito.ru/format/New_developments.xml'); |
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
#!/bin/bash | |
#-r — указывает на то, что нужно рекурсивно переходить по ссылкам на сайте, чтобы скачивать страницы. | |
#-k — используется для того, чтобы wget преобразовал все ссылки в скаченных файлах таким образом, чтобы по ним можно было переходить на локальном компьютере (в автономном режиме). | |
#-p — указывает на то, что нужно загрузить все файлы, которые требуются для отображения страниц (изображения, css и т.д.). | |
#-l — определяет максимальную глубину вложенности страниц, которые wget должен скачать (по умолчанию значение равно 5, в примере мы установили 7). В большинстве случаев сайты имеют страницы с большой степенью вложенности и wget может просто «закопаться», скачивая новые страницы. Чтобы этого не произошло можно использовать параметр -l. | |
#-E — добавлять к загруженным файлам расширение .html. | |
#-nc — при использовании данного параметра существующие файлы не будут перезаписаны. Это удобно, когда нужно продолжить загрузку сайта, прерванную в предыдущий раз | |
# Переменные цветов >> |
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 | |
class CitySubway | |
{ | |
protected static $apiCitiesUrl = "https://api.superjob.ru/2.0/towns/"; | |
protected static $apiMetroListUrl = "https://api.superjob.ru/2.0/suggest/town/:id_town/metro/all/"; | |
public static function getAllCities() | |
{ | |
$params = [ |
NewerOlder