Skip to content

Instantly share code, notes, and snippets.

💭
🛩 Running your application

Viktor Szépe szepeviktor

💭
🛩 Running your application
Block or report user

Report or block szepeviktor

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@szepeviktor
szepeviktor / smooth-scroll.js
Last active Jan 1, 2016
smooth scroll AMD update
View smooth-scroll.js
/* =============================================================
Smooth Scroll 3.0
Animate scrolling to anchor links, by Chris Ferdinandi.
http://gomakethings.com
Easing support contributed by Willem Liu.
https://github.com/willemliu
Easing functions forked from Gaëtan Renaudeau.
@szepeviktor
szepeviktor / zepto-amd.js
Last active Jan 2, 2016
Zepto 1.1.2 with UMD (no global $)
View zepto-amd.js
// Zepto.js
// (c) 2010-2014 Thomas Fuchs
// Zepto.js may be freely distributed under the MIT license.
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define([], function () {
return (root.Zepto = factory());
});
View parseuri.js
// parseUri 1.2.2
// (c) Steven Levithan <stevenlevithan.com>
// MIT License
function parseUri (str) {
var o = {
strictMode: false,
key: ["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],
q: {
name: "queryKey",
@szepeviktor
szepeviktor / cookies.js
Last active Jan 2, 2016
A complete cookies reader/writer framework with full unicode support
View cookies.js
/*
*
* :: cookies.js ::
*
* A complete cookies reader/writer framework with full unicode support.
*
* https://developer.mozilla.org/en-US/docs/Web/API/document.cookie
*
* This framework is released under the GNU Public License, version 3 or later.
* http://www.gnu.org/licenses/gpl-3.0-standalone.html
@szepeviktor
szepeviktor / ie8-indexof.js
Created Jan 6, 2014
IE8 indexOf polyfill from MDN
View ie8-indexof.js
// URL: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf
if (!Array.prototype.indexOf) {
Array.prototype.indexOf = function (searchElement, fromIndex) {
if ( this === undefined || this === null ) {
throw new TypeError( '"this" is null or not defined' );
}
var length = this.length >>> 0; // Hack to convert object.length to a UInt32
@szepeviktor
szepeviktor / jquery.easing.js
Created Jan 6, 2014
jQuery Easing AMD module v1.3
View jquery.easing.js
/*
* jQuery Easing AMD module v1.3
* URL: http://gsgd.co.uk/sandbox/jquery/easing/
*
* Uses the built in easing capabilities added In jQuery 1.1
* to offer multiple easing options
*
* TERMS OF USE - jQuery Easing
*
* Open source under the BSD License.
@szepeviktor
szepeviktor / wp-badrequest.php
Last active Dec 29, 2018
WordPress bad request - help Fail2ban to ban "deadly" requests
View wp-badrequest.php
MOVED to: https://github.com/szepeviktor/wordpress-fail2ban/tree/master/block-bad-requests
@szepeviktor
szepeviktor / google-adwords-remarketing-AMD-config.js
Last active Jan 4, 2016
loads Google Remarketing Tag script - nojs image removed
View google-adwords-remarketing-AMD-config.js
// works with curl.js + js plugin
var curl = {
paths: {
adwords: "//www.googleadservices.com/pagead/conversion.js"
}
},
// I use WordPress
// write your own conversion ID here
WP = {
@szepeviktor
szepeviktor / latin-accents.php
Created Jan 25, 2014
Keep latin accents in WordPress - an mu plugin
View latin-accents.php
<?php
/*
Plugin Name: Keep Latin accents
Plugin URI: http://awordpress.net/blog/accents-in-wordpress-permalinks/
Description: Keep Latin accents in URLs
Version: 3.0
Author: Pavel (aka Immortal) Petrov
Author URI: http://www.webbamboo.net/
License: GPL2
*/
@szepeviktor
szepeviktor / MJ12bot.htaccess
Created Jan 26, 2014
MJ12bot WordPeess helper rule - adds trailing slash
View MJ12bot.htaccess
## MJ12bot WordPeess helper rule
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} MJ12bot
RewriteCond %{REQUEST_URI} !/$
RewriteCond %{REQUEST_URI} !\.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ $1/ [L,R=permanent]
</IfModule>
You can’t perform that action at this time.