Skip to content

Instantly share code, notes, and snippets.

View anowak's full-sized avatar

Artur Nowak anowak

View GitHub Profile
@kasia-kittel
kasia-kittel / Mockito stubbing with AnyVal
Last active November 22, 2018 11:36
Avoid NullPointerException when stubbing AnyVal using Mockito
you need to stub some opeation like:
when(formDAO.addFile(any[InputStream], eq(special.id))) thenReturn Right(FileId(1))
and:
case class SpecialId(id: Long) extends AnyVal {
override def toString: String = id.toString
}
since "AnyVal is the root class of all value types, which describe values not implemented as objects in the underlying host system."
and that confuses Mockito matchers...
@bastibense
bastibense / README.md
Last active September 28, 2020 03:53
Fix blurry fonts on some external monitors when using MacBook Pro Retina

How to fix blurry fonts on some external monitors when using MacBook Pro Retina

It seems that graphcis and fonts look rather blurry on some monitors when hooked up to a MacBook Pro (Retina). This might fix the issue for you:

  1. Download patch-edid.rb from http://embdev.net/attachment/168316/patch-edid.rb

  2. Execute in Terminal (without the $):

    $ ruby patch-edid.rb

  3. Copy produced folder (example: DisplayVendorID-22f0) to /System/Library/Displays/Overrides (authorize if needed, if the folder exists, backup it before)

@entaroadun
entaroadun / gist:1653794
Created January 21, 2012 20:10
Recommendation and Ratings Public Data Sets For Machine Learning

Movies Recommendation:

Music Recommendation:

@jcartledge
jcartledge / ~_.config_terminator_config
Created April 27, 2011 04:31
terminator config solarized
[global_config]
title_transmit_bg_color = "#839496"
title_inactive_fg_color = "#93a1a1"
title_transmit_fg_color = "#eee8d5"
title_inactive_bg_color = "#586e75"
[keybindings]
[profiles]
[[default]]
palette = "#073642:#d30102:#859900:#b58900:#6c71c4:#d33682:#2aa198:#839496:#586e75:#cb4b16:#859900:#b58900:#268bd2:#d33682:#2aa198:#93a1a1"
login_shell = True