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
/* Works well on pre + code tags. */ | |
function copySelected() { | |
return document.execCommand('copy'); | |
} | |
$("#element").on("click", function () { | |
setTimeout(function (argument) { | |
copySelected(); | |
}, 100); | |
}); |
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
/* One line script, that is responsible for google chrome detection and adding smooting to it's scroll */ | |
(function(e){e.extend({browserSelector:function(){var e=navigator.userAgent,t=e.toLowerCase(),n=function(e){return t.indexOf(e)>-1},r="gecko",i="webkit",s="safari",o="opera",u=document.documentElement,a=[!/opera|webtv/i.test(t)&&/msie\s(\d)/.test(t)?"ie ie"+parseFloat(navigator.appVersion.split("MSIE")[1]):n("firefox/2")?r+" ff2":n("firefox/3.5")?r+" ff3 ff3_5":n("firefox/3")?r+" ff3":n("gecko/")?r:n("opera")?o+(/version\/(\d+)/.test(t)?" "+o+RegExp.jQuery1:/opera(\s|\/)(\d+)/.test(t)?" "+o+RegExp.jQuery2:""):n("konqueror")?"konqueror":n("chrome")?i+" chrome":n("iron")?i+" iron":n("applewebkit/")?i+" "+s+(/version\/(\d+)/.test(t)?" "+s+RegExp.jQuery1:""):n("mozilla/")?r:"",n("j2me")?"mobile":n("iphone")?"iphone":n("ipod")?"ipod":n("mac")?"mac":n("darwin")?"mac":n("webtv")?"webtv":n("win")?"win":n("freebsd")?"freebsd":n("x11")||n("linux")?"linux":"","js"];c=a.join(" ");u.className+=" "+c}})})(jQuery);(func |
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($) { | |
$("a[href^='#']") | |
.not('[href="#"]') | |
.not('[href="#0"]') | |
.on('click', function ( event ) { | |
event.preventDefault(); | |
var $scrollTarget = $( $(this).attr('href') ); | |
$scrollTarget = $scrollTarget.length ? $scrollTarget : $('[name="' + $(this).attr('href').slice(1) + '"]'); | |
/* If not found stop execution */ | |
if ( !$scrollTarget.length ) return; |
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
-- Define the repeating string to replace in database table, as well as the string that should be replaced by. | |
-- SET @what_to_be_replaced = "http://dev.sehner.international", @to_be_replaced_by = "https://sehner.international"; | |
SET @what_to_be_replaced = "https://www.pflegemarkt.com", @to_be_replaced_by = "http://dev.pflegemarkt.com"; | |
-- Update every table columns that usually contains wrong domain(local development or dev version of website) | |
-- You should provide collation of table as well for the following tables, otherwiser it will throw the error, usually it is COLLATE utf8mb4_general_ci. | |
-- THESE ARE DEFAULT TABLES OF WORDPRESS | |
UPDATE pm_commentmeta SET meta_value = REPLACE(meta_value, @what_to_be_replaced, @to_be_replaced_by ); | |
UPDATE pm_comments SET comment_content = REPLACE(comment_content, @what_to_be_replaced ,@to_be_replaced_by); |
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
/* WordPress Memory Limit */ | |
define('WP_MEMORY_LIMIT', '256M'); | |
/* cURL Timeout */ | |
ini_set('default_socket_timeout', '300'); |
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 getSelected() { | |
if (window.getSelection) { | |
return window.getSelection().toString(); | |
} else if (document.getSelection) { | |
return document.getSelection().toString(); | |
} else { | |
var selection = document.selection && document.selection.createRange(); | |
if (selection.text) { | |
return selection.text.toString(); | |
} |
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
/* Test here: http://www.meinpraktikum.de/praktikum/suchen?utf8=%E2%9C%93&q=&location=*/ | |
(function( $ ) { | |
$(document).ajaxComplete(function(){ | |
$("html, body").animate({ scrollTop: $(document).height() }, "slow"); | |
console.log($(".search-result-vacancies-box").length); | |
}) | |
})(jQuery); |
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
<IfModule mod_rewrite.c> | |
# IMPORTANT TO PLACE IT BEFORE OTHER REWRITE RULES. REDIRECTS ONE FOLDER PATH TO ANOTHER | |
Options +FollowSymLinks -MultiViews | |
RewriteEngine On | |
RewriteBase / | |
RewriteRule ^produkte/(.*)$ /pm_produkte/$1 [L,NC,R=302] | |
</IfModule> |
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
# Taken from here : https://simonecarletti.com/blog/2016/08/redirect-domain-http-https-www-apache/ | |
RewriteEngine On | |
RewriteCond %{HTTPS} off [OR] | |
RewriteCond %{HTTP_HOST} !^www\. [NC] | |
RewriteCond %{HTTP_HOST} ^(?:www\.)?(.+)$ [NC] | |
RewriteRule ^ https://www.%1%{REQUEST_URI} [L,NE,R=301] |
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 ## Функция для вывода содержимого переменной. | |
// Распечатывает дамп переменной на экран. | |
function dumper( $obj ) { | |
echo | |
"<pre>", | |
htmlspecialchars( dumperGet( $obj ) ), | |
"</pre>"; | |
} | |
// Возвращает строку - дамп значения переменной в древовидной форме |
OlderNewer