Skip to content

Instantly share code, notes, and snippets.

View accidentaldeveloper's full-sized avatar

Michael Richardson accidentaldeveloper

View GitHub Profile
@theftprevention
theftprevention / jquery-scrolllock.js
Last active July 3, 2020 06:30
A small jQuery extension that disables the propagation of scroll events from the first element in the set of matched elements. Original function by Troy Alford of Stack Overflow.$("#object").scrollLock() enables the lock, and .scrollRelease() disables it.
$.fn.scrollLock=function(){return $(this).on("DOMMouseScroll mousewheel",function(h){var g=$(this),f=this.scrollTop,d=this.scrollHeight,b=g.height(),i=h.originalEvent.wheelDelta,a=i>0,c=function(){h.stopPropagation();h.preventDefault();h.returnValue=false;return false};if(!a&&-i>d-b-f){g.scrollTop(d);return c()}else{if(a&&i>f){g.scrollTop(0);return c()}}})};$.fn.scrollRelease=function(){return $(this).off("DOMMouseScroll mousewheel")};
@chitchcock
chitchcock / 20111011_SteveYeggeGooglePlatformRant.md
Created October 12, 2011 15:53
Stevey's Google Platforms Rant

Stevey's Google Platforms Rant

I was at Amazon for about six and a half years, and now I've been at Google for that long. One thing that struck me immediately about the two companies -- an impression that has been reinforced almost daily -- is that Amazon does everything wrong, and Google does everything right. Sure, it's a sweeping generalization, but a surprisingly accurate one. It's pretty crazy. There are probably a hundred or even two hundred different ways you can compare the two companies, and Google is superior in all but three of them, if I recall correctly. I actually did a spreadsheet at one point but Legal wouldn't let me show it to anyone, even though recruiting loved it.

I mean, just to give you a very brief taste: Amazon's recruiting process is fundamentally flawed by having teams hire for themselves, so their hiring bar is incredibly inconsistent across teams, despite various efforts they've made to level it out. And their operations are a mess; they don't real

using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
namespace ConsoleApplication {
class Program {
@aaronpowell
aaronpowell / BulkNuGetInstall.ps1
Created February 25, 2011 02:26
Install NuGet across all projects
#Installs a package into all projects in the solution (note: Requires NuGet 1.1+)
Get-Project -All | Install-Package packageName