Me = this × photos × links × tweets, etc.
Don't wanna be here? Send us removal request.
Text
Example for setting up <whatever>.docker as a local domain (for Docker services)
What to do:
Install dnsmasq for resolving hostnames
Configure dnsmasq to resolve .docker requests to localhost
Configure macOS to send .docker requests to dnsmasq
brew install dnsmasq # Create config files sh -c 'echo "address=/.docker/127.0.0.1\naddress=/.docker/::1\n" > /usr/local/etc/dnsmasq.conf' sudo mkdir -p /etc/resolver sudo sh -c 'echo "nameserver 127.0.0.1\n" > /etc/resolver/docker' # Start service as root, and register it to launch on boot sudo brew services start dnsmasq
You should be able to resolve any .docker hostnames;
dig whatever.docker @localhost # should have ANSWER SECTION with mapping to 127.0.0.1 ping -c 3 something.docker # should receive response from 127.0.0.1 scutil --dns # should list resolver for 'domain: docker' with 'nameserver: 127.0.0.1'
Explanation
A custom DNS server (dnsmasq) is installed and running on localhost (127.0.0.1), and configured to resolve all hostnames ending with .docker to 127.0.0.1 (or ::1 for IPv6). Then macOS is configured to use the local DNS (dnsmasq) for all docker domain requests, pointing to 127.0.0.1 as the nameserver.
Bonus: Docker proxy
There's a clever proxy available for Docker, which will listen for created containers and auto-generate an nginx config with proxying to exposed ports. This works nicely for regular Docker containers, but when you use docker-compose a separate network is created for the services which the proxy can't access, so it'll not work without some extra setup. What I've opted for is creating a named network for the proxy, and then mapping that into the docker-conmpose config using the override file.
First, we create the custom network, and start the proxy server connected to that network (see the documentation for remaining config):
docker network create proxy docker run -d \ --name proxy \ --network proxy \ -p 80:80 \ -v /var/run/docker.sock:/tmp/docker.sock:ro \ jwilder/nginx-proxy
Then assuming we have a docker-compose.yml with two services—app & other—we can create a docker-compose.override.yml which sets up the enviromnent variable for the proxy service, and connects to the proxy network. Notice: We'll have to also define a default network (here called default) to allow the services communicate between themself:
version: '3' services: app: environment: VIRTUAL_HOST: app.docker networks: - default - nginx-proxy other: networks: - default networks: default: nginx-proxy: external: name: proxy
0 notes
Text
Using “Digital Signatur” with Mail.app
Setting up the danish public digital signature with Mail.app is not obvious, but this is what I did to make it work (needed it for setting up ePosthuset with my gmail account): First install the Digital Signatur from DanID. You should end up with a .pkcs12 certificate file, probably located in ~/.oces Install the the certificate in your keychain. This is normally done by just double-clicking the .pkcs12 file. This should also open the Keychain Access application (Hovednøglering if you're on a danish system). Locate your certificate—it will probably have your name, eg. Tobias Haagen Michaelsen for me.  Right-click the certificate and select “New Identity Preference…” (da: “Ny id-indstilling…”) and enter your e-mail address. Now comes the tricky part: As I have set up the account in Mail.app with my name and e-mail address, it doesn't immediately recognize the identity because it has the e-mail address as the name as well, so you have to double-click the identity and change the name to match your Mail.app account.  And after restarting Mail.app it now Works on My Machine™ [Deprecated description from Apple](http://support.apple.com/kb/TA22353?viewlocale=en_US)
0 notes
Text
Using physical partition on a USB disk with VirtualBox on Mac OS X
I wanted to use an external USB disk with a physical partition for a virtual machine in VirtualBox on my MacBook Air, and this isn't obvious from the gui. So this is what I found out I had to do. First, make sure that there is no partition on the disk. Then run this command: VBoxManage internalcommands createrawvmdk -filename \ ~/Library/VirtualBox/usbdisk.vmk -rawdisk /dev/disk1 -register You can now create a virtual machine and use usbdisk.vmk to install a new OS on. _Update: Later, OS X might auto mount the volume created during install. You must unmount this before you can start the virtual machine again._
0 notes
Photo
Finally got my connection running at nearly full speed. Mmmmm -- speeeed.
0 notes
Link
0 notes
Quote
Hi, I’m Web Developer Barbie. Pull my string and I say, “Standards are tough! Let’s go shopping!”
[Mark Pilgrim on Joel Spolsky](http://diveintomark.org/archives/2008/03/18/translation-from-ms-speak-to-english-of-selected-portions-of-joel-spolskys-martin-headsets)
0 notes
Quote
The tech press, it seems, has a bad record on judging products on criteria you can’t fit on a feature matrix.
[Charles Miller on the MacBook Air](http://fishbowl.pastiche.org/2008/01/22/heavier_than_air)
0 notes
Photo
Cannot uninstall because a file could not be installed (and, the uninstall did _not_ continue but was aborted)
0 notes
Quote
They even keep it on at weekends. Someone was bound to notice sooner or later.
Dirk Gently, stating that Newton merely _discovered_ gravity
0 notes
Text
Colibri tips
I have been using Colibri for a while and - inspired by Humanized Enso - really wanted to use the Caps Lock key to launch it. But unfortunately the configuration dialog requires you to press a combination of two keys.
Then today I found out that you can modify the configuration directly in a couple of SQLite databases(*). So by setting the key combination to eg. Ctrl+Caps Lock and then disable the Ctrl key in the database, I now only need to press the Caps Lock (and at the same time I prevent the default behavior of the key - YAY!)
You can also add aditional paths that should be indexed by inserting in Filesystem.sqlite
(*) The files are located in C:\Documents and Settings\{user}\Application Data\Colibri
****Update:**** You'll need some kind of SQLite browser. I've used [SQLiteadmin](http://sqliteadmin.orbmu2k.de/). Also, [Jesper](http://justaddwater.dk/) has disabled his Caps Lock key and suggests Ctrl+Scroll Lock as an alternative combination.
0 notes