Skip to content

Instantly share code, notes, and snippets.

View PanAeon's full-sized avatar
🥑
avocado

PanAeon

🥑
avocado
View GitHub Profile
@PanAeon
PanAeon / README.md
Last active October 14, 2022 22:14
Curriculum Vitae
@PanAeon
PanAeon / btrbk.nix
Last active December 16, 2022 22:44
Btrbk on nixos
{ 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
@PanAeon
PanAeon / ghci.conf
Created May 10, 2021 10:04 — forked from sorki/ghci.conf
ghci colors (~/.ghc/ghci.conf)
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
@PanAeon
PanAeon / DSL.scala
Last active May 10, 2018 20:57
DSL.scala
package mydsl3
// don't forgot DeepHLister...
import shapeless._, test._
trait DeepHLister[R <: HList] extends DepFn1[R] { type Out <: HList }
trait LowPriorityDeepHLister {
package mydsltry2
import shapeless._
import shapeless.{ HList, ::, HNil }
import scala.language.implicitConversions
trait UTupler[A] {
type Out
}
@PanAeon
PanAeon / foo.txt
Created April 27, 2017 09:12
NixOs
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/
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;
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;
@PanAeon
PanAeon / cell1.scala
Last active December 17, 2015 15:41
Serialization Error
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
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)");
}