Skip to content

Instantly share code, notes, and snippets.

View msherstobitow's full-sized avatar

Maks Sherstobitow msherstobitow

  • Wellcrafted
  • Belarus, Minsk
View GitHub Profile
@msherstobitow
msherstobitow / shopify-snippet-shortcode.md
Last active August 29, 2015 14:01
Adds ability to include any snippet with 4 lines in any template

Shopify snippet shortcode

Example

Some content text with [snippet_shorctode]

In any template

Save snippet content to a variable

#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@msherstobitow
msherstobitow / remove-pointer-events-on-page-scroll.css
Last active August 29, 2015 14:01
Web page perfomance: remove pointer-events on page scroll.
.disable-hover,
.disable-hover * {
pointer-events: none !important;
}
<!-- SEO -->
<!-- http://static.googleusercontent.com/media/www.google.com/en/us/webmasters/docs/search-engine-optimization-starter-guide.pdf -->
<meta name="author" content="Nicholas Cerminara">
<meta name="description" content="Bootstrap 3 has a ton of features and helpers to speed up front-end development. Sometimes you need something and you end up writing your own custom CSS and JavaScript without even realizing that Bootstrap could have done it for you....">
<link rel="canonical" href="http://scotch.io/bar-talk/bootstrap-3-tips-and-tricks-you-might-not-know">
<!-- Social: Twitter -->
<!-- Head up! You must visit the Twitter Validator and request approval after setting up your Meta tags. -->
@msherstobitow
msherstobitow / animate-scroll-to-selector.js
Last active August 29, 2015 14:03
Animate scroll to any node with jQuery
$('html, body').animate({ scrollTop: $('SELECTOR').offset().top - INTEGER_OFFSET_IN_PX}, INTEGER_TIME_IN_MS);
@msherstobitow
msherstobitow / google-maps-set-center-with-offset.js
Created September 23, 2014 13:43
How to offset the center of a Google maps (API v3) in pixels?
google.maps.Map.prototype.setCenterWithOffset= function(latlng, offsetX, offsetY) {
var map = this;
var ov = new google.maps.OverlayView();
ov.onAdd = function() {
var proj = this.getProjection();
var aPoint = proj.fromLatLngToContainerPixel(latlng);
aPoint.x = aPoint.x+offsetX;
aPoint.y = aPoint.y+offsetY;
map.setCenter(proj.fromContainerPixelToLatLng(aPoint));
};
sudo chown -R `whoami` ~/.atom