Skip to content

Instantly share code, notes, and snippets.

View hsanchez's full-sized avatar
I may be slow to respond.

Huascar Sanchez hsanchez

I may be slow to respond.
View GitHub Profile
@mbbx6spp
mbbx6spp / GIT-FSCK.adoc
Created February 1, 2016 15:12
How to check your git object sanity

fsck-ing your Git objects by default

Yo developers (git interactive users), check if you are fsck-ing your objects on transfer:

git config --null --get transfer.fsckobjects
git config --null --get fetch.fsckobjects

If that is null or false, then …​ set it to true:

git config --global transfer.fsckobjects true
@barneycarroll
barneycarroll / README.md
Last active August 29, 2022 12:02
Lock and unlock a page's scroll position.

jquery.scrollLock.js

Useful for when a blocking user experience is needed (in my case, didn't want people unwittingly loosing their place by scrolling while a modal required their attention): $.scrollLock() locks the body in place, preventing scroll until it is unlocked.

// Locks the page if it's currently unlocked
$.scrollLock();

// ...or vice versa