Skip to content

Instantly share code, notes, and snippets.

View szepeviktor's full-sized avatar
🍓
Guess I'm the lone ranger keeping it all running.

Viktor Szépe szepeviktor

🍓
Guess I'm the lone ranger keeping it all running.
View GitHub Profile
@szepeviktor
szepeviktor / smooth-scroll.js
Last active January 1, 2016 11:29
smooth scroll AMD update
/* =============================================================
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 January 2, 2016 07:49
Zepto 1.1.2 with UMD (no global $)
// 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());
});
@szepeviktor
szepeviktor / parseuri.js
Last active May 10, 2020 08:53
parseUri 1.2.2 Author: Steven Levithan URL: http://blog.stevenlevithan.com/archives/parseuri
// 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 January 2, 2016 09:29
A complete cookies reader/writer framework with full unicode support
/*
*
* :: 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 January 6, 2014 13:54
IE8 indexOf polyfill from MDN
// 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 January 6, 2014 15:06
jQuery Easing AMD module v1.3
/*
* 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 / download_gists2.js
Last active December 16, 2021 15:47 — forked from thomastraum/download_gists.js
save all your Gists - written in node.js
#!/usr/bin/env node
//# prerequisites:
//# npm -g install request path
//# TODO: modify user agent string
var USER, savepath,
request = require('request'),
path = require('path'),
fs = require('fs'),
@szepeviktor
szepeviktor / ajax.googleapis.com_.htaccess
Last active August 29, 2015 13:56
bad robot catcher - "nofollow" and "disallow" trap
# put this in directory called /ajax.googleapis.com/
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^ index.php [L]
</IfModule>
@szepeviktor
szepeviktor / GeoIP-hu-IPrange.sh
Created February 27, 2014 00:46
Magyar IP cím tartomány generáló - maxmind.com & ip.ludost.net
#!/bin/bash
OUT="GeoIPhuWhois.txt"
OUT2="ip.ludost.txt"
if ! [ -f GeoIPCountryWhois.csv ]
then
wget -q http://geolite.maxmind.com/download/geoip/database/GeoIPCountryCSV.zip
7z x GeoIPCountryCSV.zip > /dev/null
fi
@szepeviktor
szepeviktor / nginx-chroot-helper.sh
Last active August 10, 2016 10:51
nginx Chroot Helper Script To Copy Libs To /lib64 and /usr/lib64
#!/bin/bash
set -e
# Use this script to copy shared (libs) files to nginx chrooted
# jail server. This is tested on 64 bit Linux (Redhat and Friends only)
# ----------------------------------------------------------------------------
# Original Written by Vivek Gite <http://www.cyberciti.biz/>
# (c) 2006 nixCraft under GNU GPL v2.0+
# ----------------------------------------------------------------------------
# See url for usage: