Skip to content

Instantly share code, notes, and snippets.

View robertovg's full-sized avatar

Roberto Vázquez González robertovg

  • Senior Software Engineer
  • Conil de la Frontera
  • 09:40 (UTC +02:00)
View GitHub Profile
@robertovg
robertovg / gist:f76939a78f58eef32408
Created February 2, 2016 18:09 — forked from sjwilliams/gist:3903157
Sublime Text 2 Cheat Sheet. Shortcuts, including Vintage mode.

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘KB toggle side bar
⌘⇧P command prompt
⌃ ` python console
⌘⇧N new window (useful for new project)
app.directive('infiniteScroll', [
'$rootScope', '$window', '$timeout', function($rootScope, $window, $timeout) {
return {
link: function(scope, elem, attrs) {
var checkWhenEnabled, handler, scrollDistance, scrollEnabled;
$window = angular.element($window);
elem.css('overflow-y', 'scroll');
elem.css('overflow-x', 'hidden');
elem.css('height', 'inherit');
scrollDistance = 0;
@robertovg
robertovg / gist:3813004
Created October 1, 2012 16:56 — forked from padolsey/gist:527683
JavaScript: Detect ie
// ----------------------------------------------------------
// A short snippet for detecting versions of IE in JavaScript
// without resorting to user-agent sniffing
// ----------------------------------------------------------
// If you're not in IE (or IE version is less than 5) then:
// ie === undefined
// If you're in IE (>=5) then you can determine which version:
// ie === 7; // IE7
// Thus, to detect IE:
// if (ie) {}