Skip to content

Instantly share code, notes, and snippets.

View kgust's full-sized avatar

Kevin Gustavson kgust

  • Vanderbilt University Medical Center
  • Nashville, Tennessee USA
View GitHub Profile
@kgust
kgust / docker-info.md
Last active September 12, 2016 22:21
Useful Docker (For Mac) Information

To reduce the Docker.qcow2 size (there is an offical solution pending)

  1. screen ~/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/tty
  2. login as root
  3. dd if=/dev/zero of=/mnt/docker/zero bs=4096 to fill zero bytes into the free space of the ext4 file system under Docker.qcow4, until the disk is full
  4. rm /mnt/docker/zero then all the free space of Docker.qcow2 would be filled with zeros
  5. logout, and detach screen
  6. Finally reduce the the Docker.qcow2 file size, /Applications/Docker.app/Contents/MacOS/qemu-img convert -O qcow2 Docker.qcow2 Docker2.qcow2

Interface alias

sudo ifconfig lo0 alias 10.254.254.254

@kgust
kgust / README.md
Last active May 29, 2019 13:02 — forked from ralphschindler/README.md
Docker For Mac - De-facto Host Address Alias (10.254.254.254) - "The 10254 Trick".

Docker (Mac) De-facto Standard Host Address Alias

This launchd script will ensure that your Docker environment on your Mac will have 10.254.254.254 as an alias on your loopback device (127.0.0.1). The command being run is ifconfig lo0 alias 10.254.254.254

Installation

Copy/Paste the following in terminal with sudo (must be root as the target directory is owned by root)...

sudo curl -o /Library/LaunchDaemons/info.kevingustavson.docker_10254_alias.plist https://gist.github.com/kgust/3fe1ae7420e2b35ed3b40eb3feef4efe/raw/info.kevingustavson.docker_10254_alias.plist
mail:
image: schickling/mailcatcher
ports:
- "1080:1080"
@kgust
kgust / Development Tools.md
Last active May 9, 2016 02:33
Development Tools
@kgust
kgust / Install Oracle 11g.md
Last active April 26, 2016 14:11
Install Oracle 11g (contains tablespace resize)
@kgust
kgust / gpg-agent.conf
Created April 12, 2016 15:20 — forked from nl5887/gpg-agent.conf
Using GPG Agent on OS-X
launchctl unload -w -S Aqua /System/Library/LaunchAgents/gpg.agent.daemon.plist
launchctl load -w -S Aqua /System/Library/LaunchAgents/gpg.agent.daemon.plist
@kgust
kgust / LICENSE
Last active August 29, 2015 14:27 — forked from ourmaninamsterdam/LICENSE
Arrayzing - The JavaScript array cheatsheet
The MIT License (MIT)
Copyright (c) 2015 Justin Perry
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
<html>
<head>
<link rel="stylesheet" type="text/css" href="style.css">
<script type="text/javascript" src="https://code.jquery.com/jquery-1.11.3.min.js"></script>
<script type="text/javascript">
function login_flip()
{
$("#loginform").css({"-webkit-transition":"-webkit-transform 0.9s","transition":" transform 0.9s"});
$("#loginform").css({"-moz-transform":"scaleX(1)","-o-transform":"scaleX(1)","-webkit-transform":"scaleX(1)","transform":"scaleX(1)"});
@kgust
kgust / caffeine-off.pdf
Last active August 29, 2015 14:24
My Hammerspoon configuration
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kgust
kgust / things I want to remember SN.txt
Created June 5, 2015 14:36
Things I want to remember from Straight North
Use `excel_cmp` to make sure that you don't have deprecations when changing an Excel report.