Skip to content

Instantly share code, notes, and snippets.

Maks Sherstobitow msherstobitow

Block or report user

Report or block msherstobitow

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
@msherstobitow
msherstobitow / google-maps-set-center-with-offset.js
Created Sep 23, 2014
How to offset the center of a Google maps (API v3) in pixels?
View google-maps-set-center-with-offset.js
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));
};
@msherstobitow
msherstobitow / animate-scroll-to-selector.js
Last active Aug 29, 2015
Animate scroll to any node with jQuery
View animate-scroll-to-selector.js
$('html, body').animate({ scrollTop: $('SELECTOR').offset().top - INTEGER_OFFSET_IN_PX}, INTEGER_TIME_IN_MS);
View social-meta-tags-starter-template.html
<!-- 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 / remove-pointer-events-on-page-scroll.css
Last active Aug 29, 2015
Web page perfomance: remove pointer-events on page scroll.
View remove-pointer-events-on-page-scroll.css
.disable-hover,
.disable-hover * {
pointer-events: none !important;
}
View hack.sh
#!/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 / shopify-snippet-shortcode.md
Last active Aug 29, 2015
Adds ability to include any snippet with 4 lines in any template
View shopify-snippet-shortcode.md

Shopify snippet shortcode

Example

Some content text with [snippet_shorctode]

In any template

Save snippet content to a variable

You can’t perform that action at this time.