Skip to content

Instantly share code, notes, and snippets.

@regadas
regadas / build.sbt
Created September 19, 2011 08:58
SBT 0.10.X eclipse plugin configuration
// this file should be in ~/.sbt/plugins/ as every other plugin that is meant to be global
resolvers += {
val typesafeRepoUrl = new java.net.URL("http://repo.typesafe.com/typesafe/releases")
val pattern = Patterns(false, "[organisation]/[module]/[sbtversion]/[revision]/[type]s/[module](-[classifier])-[revision].[ext]")
Resolver.url("Typesafe Repository", typesafeRepoUrl)(pattern)
}
libraryDependencies <<= (libraryDependencies, sbtVersion) { (deps, version) =>
deps :+ ("com.typesafe.sbteclipse" %% "sbteclipse" % "1.3-RC3" extra("sbtversion" -> version))
@regadas
regadas / nginx.conf
Created November 9, 2013 03:17
nginx cached forward proxy #example
user www-data;
worker_processes 1;
pid /var/run/nginx.pid;
events {
worker_connections 2048;
multi_accept on;
use epoll;
}
@regadas
regadas / prompt_regadas_setup
Created March 3, 2015 18:13
custom zsh prezto prompt
#
# A simple theme that displays:
# - Python virtual environment.
# - Git branch.
# - Git state.
#
# Authors:
# Filipe Regadas<[email protected]>
#
@regadas
regadas / idea.vmoptions
Last active March 18, 2020 19:06
IDEA vmoptions
-ea
-server
-Xms4G
-Xmx4096m
-Xss2m
-XX:MaxMetaspaceSize=2G
-XX:ReservedCodeCacheSize=1G
-XX:MetaspaceSize=512m
-XX:+UseConcMarkSweepGC
-XX:+DoEscapeAnalysis
/**
* KVStore use case based on cats docs.
*
* trait class Free[F[_], A]
*
* Return from the computation with the given value.
*
* case class Pure[S[_], A](a: A) extends Free[S, A]
*
* Suspend the computation with the given suspension.
@regadas
regadas / BigtableDoFn.scala
Last active December 14, 2017 22:35
BigtableDoFn.scala
/*
* Copyright 2017 Spotify AB.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,

Keybase proof

I hereby claim:

  • I am regadas on github.
  • I am regadas (https://keybase.io/regadas) on keybase.
  • I have a public key ASBFO-8X4XxP78apbW2RL0KMefQkPGDOYTNKJV5BCzSyhwo

To claim this, I am signing this object:

@regadas
regadas / example.sc
Last active March 14, 2018 03:11
field based circe decoder
import cats.syntax.functor._
import io.circe.Decoder
import io.circe.generic.auto._
import io.circe.parser.decode
trait Event
case class Foo(x: Int) extends Event
case class Bar(y: String) extends Event
@regadas
regadas / build.sbt
Created January 24, 2020 16:47
scio ConflictManager.strict experiment
import sbt._
import Keys._
ThisBuild / conflictManager := ConflictManager.strict
ThisBuild / dependencyOverrides ++= Seq(
"com.fasterxml.jackson.core" % "jackson-annotations" % "2.10.2",
"com.fasterxml.jackson.core" % "jackson-core" % "2.10.2",
"com.fasterxml.jackson.core" % "jackson-databind" % "2.10.2",
"com.fasterxml.jackson.module" %% "jackson-module-scala" % "2.10.2",
"com.google.api" % "api-common" % "1.7.0",
-- let foo =
-- https://raw.githubusercontent.com/regadas/github-actions-dhall/master/package.dhall
-- let asd =
-- https://raw.githubusercontent.com/regadas/github-actions-dhall/master/types/Workflow.dhall sha256:76c5f5028902b533b26870f019da80c6199dd6b117bbd060d5139087e17cd235
let asd =
https://raw.githubusercontent.com/regadas/github-actions-dhall/master/types/Workflow.dhall