built with nix and LaTeX. source code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { config, pkgs, lib, ... }: | |
| let | |
| cfg = config.services.btrbk; | |
| sshEnabled = cfg.sshAccess != [ ]; | |
| serviceEnabled = cfg.instances != { }; | |
| attr2Lines = attr: | |
| let | |
| pairs = lib.attrsets.mapAttrsToList (name: value: { inherit name value; }) attr; | |
| isSubsection = value: | |
| if builtins.isAttrs value then true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Control.Applicative | |
| import Control.Monad | |
| import Control.Concurrent | |
| import Data.String | |
| import Data.Char | |
| import Data.List | |
| import Data.Monoid | |
| import Control.Monad.IO.Class |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package mydsl3 | |
| // don't forgot DeepHLister... | |
| import shapeless._, test._ | |
| trait DeepHLister[R <: HList] extends DepFn1[R] { type Out <: HList } | |
| trait LowPriorityDeepHLister { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package mydsltry2 | |
| import shapeless._ | |
| import shapeless.{ HList, ::, HNil } | |
| import scala.language.implicitConversions | |
| trait UTupler[A] { | |
| type Out | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| https://gist.github.com/yoshuawuyts/042342257126301387d2 | |
| http://sandervanderburg.blogspot.com/2014/07/managing-private-nix-packages-outside.html | |
| http://funops.co/nix-cookbook/nix-by-example/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class JavafxDslTest extends Application implements JavaFxDsl { | |
| public static void main(String[] args) { | |
| launch(JavafxDslTest.class); | |
| } | |
| @Bind(id = "pill-left") | |
| private ToggleButton fromExisting; | |
| @Bind(id = "pill-right") | |
| private ToggleButton fromNew; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package utils; | |
| import java.io.BufferedReader; | |
| import java.io.IOException; | |
| import java.io.InputStreamReader; | |
| import java.util.ArrayList; | |
| import java.util.Date; | |
| import java.util.HashMap; | |
| import java.util.List; | |
| import java.util.Map; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| val rdd = sc.parallelize(Stream.from(1).take(1000).toList,4) | |
| class NotSerializable() | |
| val bar = new NotSerializable() | |
| val simpleVariable = Set(1, 2, 3, 6, 7, 8, 9, 10, 11, 12, 13, 15, 16, 17, 18, 19) | |
| // here's the problem, this code runs forever: | |
| rdd |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| interface Callee { | |
| public void foo(Object o); | |
| public void foo(String s); | |
| public void foo(Integer i); | |
| } | |
| class CalleeImpl implements Callee | |
| public void foo(Object o) { | |
| logger.debug("foo(Object o)"); | |
| } |
NewerOlder