По материалам сайта Calculate Linux: https://www.calculate-linux.org/main/ru/git
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
| TRUNCATE `ps_connections`; | |
| TRUNCATE `ps_connections_page`; | |
| TRUNCATE `ps_connections_source`; | |
| TRUNCATE `ps_page_viewed`; | |
| TRUNCATE `ps_guest`; |
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
| # ----------------------------------------------------------------- | |
| # .gitignore | |
| # Bare Minimum Git | |
| # http://ironco.de/bare-minimum-git/ | |
| # ver 20181206 | |
| # | |
| # From the root of your project run | |
| # curl -O https://gist.github.com/salcode/10017553/raw/.gitignore | |
| # to download this file | |
| # |
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 | |
| /** | |
| * Date: 29.07.2019 | |
| * Time: 20:49 | |
| * hacked by @weblegko | |
| * plugin for slug and many different thubnail creation on file upload | |
| */ | |
| namespace mihaildev\elfinder\plugin; |
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
| # ---------- склеим - сделаем основным зеркалом без www --------- | |
| RewriteCond %{HTTP_HOST} ^www.(.+)$ [NC] | |
| RewriteRule ^(.*)$ http://%1/$1 [R=301,L] | |
| # --------- 301 redirect http -> https --------- | |
| #сначала клием www на без www | |
| RewriteEngine On | |
| RewriteCond %{HTTP_HOST} ^www\.(.+) [NC] | |
| RewriteRule .* http://%1/$0 [L,R=301] |
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
| SET @oldsite='http://oldsite.com'; | |
| SET @newsite='http://newsite.com'; | |
| UPDATE wp_options SET option_value = replace(option_value, @oldsite, @newsite) WHERE option_name = 'home' OR option_name = 'siteurl'; | |
| UPDATE wp_posts SET post_content = replace(post_content, @oldsite, @newsite); | |
| UPDATE wp_links SET link_url = replace(link_url, @oldsite, @newsite); | |
| UPDATE wp_postmeta SET meta_value = replace(meta_value, @oldsite, @newsite); | |
| /* only uncomment next line if you want all your current posts to post to RSS again as new */ | |
| #UPDATE wp_posts SET guid = replace(guid, @oldsite, @newsite); |
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
| .test{ | |
| color: #fff; | |
| background: blue; | |
| box-shadow: 0 0 10px rgba(0,0,0,0.5); | |
| } | |
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
| // Расширим функционал стандартных функций jquery: addClass, removeClass - добавив им timeout и callback | |
| (function() { | |
| var addClass, removeClass; | |
| addClass = $.fn.addClass; | |
| removeClass = $.fn.removeClass; | |
| $.fn.removeClass = function(classNames, timeout, callback) { | |
| if (timeout) { | |
| this.delay(timeout).queue(function() { | |
| removeClass.call($(this), classNames); | |
| if (callback) { |
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 a = declOfNum(num_persons, ['активный','активных','активных']); | |
| function declOfNum(number, titles) | |
| { | |
| cases = [2, 0, 1, 1, 1, 2]; | |
| return titles[ (number%100>4 && number%100<20)? 2 : cases[(number%10<5)?number%10:5] ]; | |
| } |
NewerOlder