Skip to content

Instantly share code, notes, and snippets.

Anthony Garand garand

Block or report user

Report or block garand

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
@garand
garand / gist:b83e63b2ea48e17195465a078611296b
Created Feb 8, 2017
Bash script to open the currently running Docker container that is using port 80
View gist:b83e63b2ea48e17195465a078611296b
docker-open() {
open http://${(L)$(hostname -s)}.local:`docker inspect --format='{{(index (index .NetworkSettings.Ports "80/tcp") 0).HostPort}}' $(docker-compose ps -q)`
}
View gist:175cad080a6554cc2190
// Header Shrink
var header_element = $('body > header');
var header_height = header_element.outerHeight(); // Get the header height dynamically so it can be set with CSS
var header_offset = header_element.next().css('paddingTop').slice(0,-2) - header_height; // Find out the offset for the header to take into account any existing padding in the CSS
scaleHeader(); // Run once on page load so the header shrinks if the page loads already scrolled down
$(window).scroll(function() { scaleHeader(); });
View keybase.md

Keybase proof

I hereby claim:

  • I am garand on github.
  • I am garand (https://keybase.io/garand) on keybase.
  • I have a public key whose fingerprint is 13C0 2C01 9880 B9E3 F0AD 1F85 BBDB 132B B212 A208

To claim this, I am signing this object:

You can’t perform that action at this time.