Skip to content

Instantly share code, notes, and snippets.

View Andrea's full-sized avatar
🦦

Andrea Andrea

🦦
View GitHub Profile
@Andrea
Andrea / http4sStuff.scala
Created April 6, 2020 10:03
Most of the config
```
//...
private val nThreads = Runtime.getRuntime.availableProcessors * 2
private val executorService = Executors.newFixedThreadPool(nThreads)
implicit val executionContext: ExecutionContextExecutorService = ExecutionContext.fromExecutorService(executorService)
implicit val cs: ContextShift[IO] = IO.contextShift(ec)
implicit val timer: Timer[IO] = IO.timer(ec)

Keybase proof

I hereby claim:

  • I am andrea on github.
  • I am roundcrisis (https://keybase.io/roundcrisis) on keybase.
  • I have a public key ASAUbUQd7hfqrEnV7duKXBfF0BQxpPdiASYGg75wa8qPCgo

To claim this, I am signing this object:

@Andrea
Andrea / templates.md
Created February 26, 2018 18:51
Scala templates

Templates

  • Scala Cats sbt new underscoreio/cats-seed.g8
  • http4s sbt new http4s/http4s.g8
@Andrea
Andrea / scala-news-12-02.md
Last active February 11, 2018 16:03
Scala news - 12th feb
type Var = string
type Term =
| Number of int
| Pair of (Term * Term)
| Variable of Var
type Subs = (Var * Term ) list
let emptySubs : Subs = []
open System
type Result =
| IsPanagram
| NotPanagram
let (|RightSize|) (s:string) = s.Length > 1 && s.Length < 1000
let isPanagram (s: string) =
@Andrea
Andrea / option2.fs
Created October 14, 2015 19:47
Kats conf
let isPrime x =
match x with
| 2 | 3 -> true
| x when x % 2 = 0 -> false
| _ ->
let rec superPrimeCheck i =
match i with
| i when x % i = 0 -> false
| i when x < i*i -> true
| _ -> superPrimeCheck (i + 2)

23/10/2015 MADRID PUERTA DE ATOCHA - CADIZ. Departures at 8:30 and arrives at 12:38 hours.

23/10/2015 MADRID PUERTA DE ATOCHA - CADIZ. Departures at 13:30 and arrives at 17:40 hours.

23/10/2015 MADRID PUERTA DE ATOCHA - CADIZ. Departures at 16:15 and arrives at 20:30 hours.

23/10/2015 MADRID PUERTA DE ATOCHA - CADIZ. Departures at 18:35 and arrives at 22:39 hours.

@Andrea
Andrea / conf.md
Last active August 29, 2015 14:26
Making your programming conference more diverse

Making your programming conference more diverse

  • Ensure you have a code of conduct (available in the conference website) all staff for the conference must know and understand how to deal with queries regarding any form of harrasment during the conference.
  • Do a Call for presentations
  • In the call for presentations, provide information for potential speakers about financial support. Commercial conferences at minimum should aim to provide roundtrip travel and accommodations for the entire conference. If it's a non-profit conference with a smaller budget, inquire with speakers to find out their needs for financial assistance expenses and then find sponsors that can cover them.
  • Get a diverse line up ( start inviting early, people who speak are generally booked up many months in advance, particularly in Europe)
  • Scholarship for people who can't afford to attend, this means at a minimum you set aside a few tickets for people who want to come but can't afford it and even better try to subsidise trav
Starting: D:\TeamCity9\buildAgent\temp\agentTmp\custom_script3388580896349143851.cmd
[2015-03-20 19:30:42,066] out - in directory: D:\TeamCity9\buildAgent\work\5b9612e40cf3fd7d\BuildSteam
[2015-03-20 19:30:42,076] err - D:\TeamCity9\buildAgent\temp\agentTmp\custom_script3388580896349143851.cmd
[2015-03-20 19:30:45,643] out -
[2015-03-20 19:30:45,650] out - Unhandled Exception: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
[2015-03-20 19:30:45,650] out - at OpenTK.Graphics.OpenGL.GL.CreateProgram()
[2015-03-20 19:30:45,650] out - at Duality.Resources.ShaderProgram.AttachShaders(ContentRef`1 v, ContentRef`1 f, ContentRef`1 g) in d:\TeamCity9\buildAgent\work\df69930dfe788c6f\Duality\Resources\ShaderProgram.cs:line 208
[2015-03-20 19:30:45,650] out - at Duality.Resources.ShaderProgram..ctor(ContentRef`1 v, ContentRef`1 f) in d:\TeamCity9\buildAgent\work\df69930dfe788c6f\Duality\Resources\ShaderProgram.cs:line 188