- Set "Use full resolution for Retina display" in the VM's Settings > Display
- Run this command in Terminal
sudo defaults write /Library/Preferences/com.apple.windowserver.plist DisplayResolutionEnabled -bool true - In System Preferences, set the display to "scaled" using the resolution 1292 x 807 (HiDPI)
- Enjoy.
| import argonaut._, Argonaut._ | |
| class Example(val s: String, val i: Int) | |
| object Example { | |
| implicit def ExampleEncodeJson: EncodeJson[Example] = | |
| EncodeJson(example => Json( | |
| "s" := example.s, | |
| "i" := example.i)) |
| import Prelude | |
| import Codec.Picture -- http://hackage.haskell.org/package/JuicyPixels | |
| import Data.Ratio | |
| import Control.Arrow | |
| import Control.Monad | |
| import Control.Applicative | |
| import System.FilePath | |
| import System.Directory | |
| tn :: Int -> FilePath -> IO FilePath |
Have you ever had to write code that made a complex series of succesive modifications to a single piece of mutable state? (Almost certainly yes.)
Did you ever wish you could make the compiler tell you if a particular operation on the state was illegal at a given point in the modifications? (If you're a fan of static typing, probably yes.)
If that's the case, the indexed state monad can help!
Motivation
| from jinja2 import BytecodeCache | |
| class RedisTemplateBytecodeCache(BytecodeCache): | |
| '''Implements a Jinja2 bytecode cache on top of a pyredis.StrictRedis | |
| connection | |
| See: http://jinja.pocoo.org/docs/2.10/api/#bytecode-cache | |
| ''' | |
| def __init__(self, redis_cnx, template_cache_key_prefix=None, ttl=86400): |
| #! /bin/bash | |
| ### BEGIN INIT INFO | |
| # Provides: redis-server | |
| # Required-Start: $remote_fs $syslog | |
| # Required-Stop: $remote_fs $syslog | |
| # Should-Start: $local_fs | |
| # Should-Stop: $local_fs | |
| # Default-Start: 2 3 4 5 | |
| # Default-Stop: 0 1 6 | |
| # Short-Description: redis-server - Persistent key-value db |
An ongoing project to catalogue all of these sneaky, hidden, bleeding edge selectors as I prepare my JSConf EU 2012 talk.
Everything is broken up by tag, but within each the selectors aren't particularly ordered.
I have not tested/verified all of these. Have I missed some or got it wrong? Let me know. - A
A friendly reminder that you may need to set this property on your target/selected element to get the styling results you want:
-webkit-appearance:none;
| from flask import request, url_for | |
| def url_for_here(**changed_args): | |
| args = request.args_args.copy() | |
| args.update(request.view_args) | |
| args.update(changed_args) | |
| return url_for(request.endpoint, **args) | |
| app.jinja_env.globals['url_for_here'] = url_for_here |
| {-# LANGUAGE OverloadedStrings #-} | |
| -- | Wai+Warp file server. Used GHC 7.4, Wai 1.1, Warp 1.1 versions. | |
| module Main where | |
| import Network.Wai.Handler.Warp (run) | |
| import Network.Wai.Application.Static | |
| ( StaticSettings(..) | |
| , staticApp | |
| , fileSystemLookup |
