Sublime Text already supports Retina displays on OS X, however it seems that the story is currently a bit different on Windows.
Update – Monday, November 14, 2016: To make this a whole lot easier, I’ve forked buymeasoda/soda-theme into moodmosaic/soda-theme. If you clone moodmosaic/soda-theme, it will show nicely on Retina displays on Windows.
You experience fuzzy fonts when using Sublime Text with Retina displays on Windows, even after updating to a newer version of Sublime Text.
- Navigate to the theme’s root folder
- Search for images matching the pattern
- Copy and paste each image, in-place, by removing the @2x part from the filename, thus replacing any existing one.
If done manually, this can take some time. – Here is a way to automate this with F#:
Save the following F# program to a file:
- Before opening Sublime Text, add the compiler and F# Interactive executables’ folder to PATH. – On my machine they are located in C:\Program Files (x86)\Microsoft SDKs\F#\x.x\Framework\vx.x.
- Open Sublime Text
- Install SublimeREPL.
- Go to Tools > SublimeREPl > F#
- In the F# Interactive prompt type,
#I @"X:\Tools", followed by
You should see something like:
open Sublime.Text.Windows, execute the
patch function by supplying a value for
Default Theme is .zipped in
\Packages\Theme - Default.sublime-package and has to be unzipped first, patched, and then zipped back again.
Enjoy Sublime Text with Retina displays on Windows!
As the diff-output shows, applying filtering with Drains cuts the maintenance of multiple homogenous abstractions, and makes the code cleaner and easier to reason about.
To apply the diff, access the source code by getting a Pluralsight subscription which is totally worth it for this course.
In most common scenarios, README files can have one of the following layouts.
- Where to download?
- Versioning scheme
- Build instructions
- Contributing guidelines
The basic layout might seems too much in the beginning, but I think this is quite essential and valuable information that each open source project could have.
- Basic +
- What problem does the project address?
- Who cares?
- How does it work?
Including these additional sections in the README almost eliminates the need to write an introductory blog post about the project.
- Extended +
- Open source maturity level1
- Who uses it?
- Additional resources
As the project becomes bigger and successful, these additional sections tend to minimize potential duplicate questions on Stack Overflow and questions as issues on GitHub.
1 The description for the maturity levels of open source code can be found here.
The previous post described what Mountebank is, as well as how to use Mountebank imposters as Mocks via HTTP and F#.
This post describes how to use Mountebank imposters as Stubs via HTTP, xUnit.net, and F#.
The Stub example in Mountebank API documentation simulates a RESTful endpoint that creates a Customer, the first time it’s called, and returns a 400 Bad Request the second time it’s called with the same Customer because the email address already exists.
Intercepting imposter Stub setup
If fixture setup and fixture teardown phases are always the same, they could be extracted into an Interceptor class.
Using imposter Stubs with xUnit.net
With xUnit.net and the
UseImposterStubAttribute, the original Stub example can be written as:
UseImposterStubAttribute arguments are
- the Mountebank server host
- the Mountebank server port number
- the imposter (protocol, port, and return values) specified in the JSON setup
When running the test, the output on the Mountebank server console is:
- During the setup phase an imposter Stub is created via HTTP POST using the the Mountebank URL and imposter protocol (http) and port (4545) defined in the
- During the teardown phase the imposter Stub is removed.
It is now easy to do something similar with F#, xUnit.net and the
The complete source code is available on this gist - any comments or suggestions are always welcome.
subscribe via RSS