Skip to content

Instantly share code, notes, and snippets.

View d3zorg's full-sized avatar

Denis Safronenkov d3zorg

View GitHub Profile
@d3zorg
d3zorg / env.rb
Created August 28, 2014 05:46
env.rb
# encoding: utf-8
HTTP_TIMEOUT = 30
def change_separator directories
dir_path = directories.join(File::SEPARATOR)
dir_path.gsub! File::SEPARATOR, File::ALT_SEPARATOR || File::SEPARATOR
end
def includeScripts
@d3zorg
d3zorg / gist:080bc3139e05e8ab7599
Last active May 23, 2016 01:19
iitc waypoints
// ==UserScript==
// @id iitc-plugin-waypoints
// @name IITC plugin: Waypoints
// @category Layer
// @version 0.0.1
// @author Nobody
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion
// @description Creates paths of waypoints to plan ingress actions in more detail
// @include https://www.ingress.com/intel*
// @include http://www.ingress.com/intel*
upstream discourse {
#fail_timeout is optional; I throw it in to see errors quickly
server 127.0.0.1:4578 fail_timeout=5;
}
# configure the virtual host
server {
# replace with your domain name
server_name discourse.example.com;
@d3zorg
d3zorg / lekker
Created May 27, 2015 07:48
oh my js
/**
* Copyright (c) 2007-2012 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com
* Dual licensed under MIT and GPL.
* @author Ariel Flesler
* @version 1.4.3.1
*/
;(function($){var h=$.scrollTo=function(a,b,c){$(window).scrollTo(a,b,c)};h.defaults={axis:'xy',duration:parseFloat($.fn.jquery)>=1.3?0:1,limit:true};h.window=function(a){return $(window)._scrollable()};$.fn._scrollable=function(){return this.map(function(){var a=this,isWin=!a.nodeName||$.inArray(a.nodeName.toLowerCase(),['iframe','#document','html','body'])!=-1;if(!isWin)return a;var b=(a.contentWindow||a).document||a.ownerDocument||a;return/webkit/i.test(navigator.userAgent)||b.compatMode=='BackCompat'?b.body:b.documentElement})};$.fn.scrollTo=function(e,f,g){if(typeof f=='object'){g=f;f=0}if(typeof g=='function')g={onAfter:g};if(e=='max')e=9e9;g=$.extend({},h.defaults,g);f=f||g.duration;g.queue=g.queue&&g.axis.length>1;if(g.queue)f/=2;g.offset=both(g.offset);g.over=both(g.over);return this._scrollable().each(function(){if