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 | |
| namespace App\Http; | |
| /** | |
| * Description of VideoStream | |
| * | |
| * @author Rana | |
| * @link https://gist.github.com/vluzrmos/d5682ad426525196d069 | |
| */ |
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 | |
| #!/usr/bin/env php | |
| foreach(glob("*.js") as $js){ | |
| echo "wp_enqueue_script( 'wptheme-{$js}', get_template_directory_uri().'/js/{$js}', array('jquery'),'1.0',true);\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
| find -name "*.php" -exec sed -i "s/\/wp-content/\/content/g" {} \; | |
| find -name "*.php" -exec sed -i "s/wp-content\//content\//g" {} \; | |
| find -name "*.php" -exec sed -i "s/'wp-content'/'content'/g" {} \; | |
| find -name "*.php" -exec sed -i "s/'wp-includes'/'includes'/g" {} \; | |
| find -name "*.php" -exec sed -i "s/wp-includes\//includes\//g" {} \; | |
| find -name "*.php" -exec sed -i "s/wp-admin\//admn\//g" {} \; | |
| find -name "*.php" -exec sed -i "s/'wp-admin'/'admn'/g" {} \; | |
| find -name "*.xml" -exec sed -i "s/wp-admin\//admn\//g" {} \; | |
| find -name "*.php" -exec sed -i "s/'wp-login.php'/'logn.php'/g" {} \; | |
| find -name "*.php" -exec sed -i "s/'wp-login.php\?/'logn.php\?/g" {} \; |
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
| /** | |
| * ChromePHP Debugging | |
| * Author: Rachel Baker | |
| */ | |
| function chromePHPDebugTool() | |
| { | |
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-FPM CONFIG | |
| # ============================ | |
| fpm_settings(){ | |
| sed -i -e 's/user = apache/user = nginx/' /etc/php-fpm.d/www.conf | |
| sed -i -e 's/group = apache/group = nginx/' /etc/php-fpm.d/www.conf | |
| sed -i -e 's/listen = 127.0.0.1:9000/listen = \/var\/run\/php-fpm.sock/' /etc/php-fpm.d/www.conf | |
| } |
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 | |
| // Original: https://github.com/faeronsayn/embed-video/blob/master/embed-function.php | |
| function embeddingVideos($videoID, $videoProvider) { | |
| $width = "100%"; | |
| $height = "100%"; | |
| if ($videoProvider == "DailyMotion") { ?> | |
| <iframe id="video" frameborder="0" width="<?php echo $width; ?>" height="<?php echo $height; ?>" src="http://www.dailymotion.com/embed/video/<?php echo $videoID; ?>"></iframe> | |
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
| var gulp = require('gulp'), // Подключаем Gulp | |
| sass = require('gulp-sass'), //Подключаем Sass пакет, | |
| browserSync = require('browser-sync'), // Подключаем Browser Sync | |
| concat = require('gulp-concat'), // Подключаем gulp-concat (для конкатенации файлов) | |
| uglify = require('gulp-uglifyjs'), // Подключаем gulp-uglifyjs (для сжатия JS) | |
| cssnano = require('gulp-cssnano'), // Подключаем пакет для минификации CSS | |
| rename = require('gulp-rename'), // Подключаем библиотеку для переименования файлов | |
| del = require('del'), // Подключаем библиотеку для удаления файлов и папок | |
| imagemin = require('gulp-imagemin'), // Подключаем библиотеку для работы с изображениями | |
| pngquant = require('imagemin-pngquant'), // Подключаем библиотеку для работы с png |
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 YK{ | |
| /* ... */ | |
| /** | |
| * проверка заказа | |
| * @param array $params параметры от яндекса | |
| */ | |
| public function check($params){ | |
| $code = 0; |
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 | |
| /* | |
| * Алгоритм нахождения числа Фибоначчи по заданному номеру, без использования циклов и рекурсии, | |
| * на основе формулы Бине. | |
| */ | |
| function binetFibonacciNumbers($n) { | |
| $s = sqrt(5); | |
| $a = (1 + $s) / 2; | |
| $b = (1 - $s) / 2; | |
| return (pow($a, $n) - pow($b, $n)) / $s; |
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 | |
| /** | |
| * Вырезание текста между HTML тэгов | |
| * | |
| * @author Agel_Nash <Agel_Nash@xaker.ru> | |
| * @version 0.1 | |
| * | |
| * @param string $html HTML текст | |
| * @param string $tag HTML тэг в котором производить поиск | |
| * @return array |