Skip to content

Instantly share code, notes, and snippets.

View clementi's full-sized avatar
🎵
NP: Farrenc: Symphony No. 3 in G Minor, O… (10:07/10:33)

Jeff Pratt clementi

🎵
NP: Farrenc: Symphony No. 3 in G Minor, O… (10:07/10:33)
View GitHub Profile
@clementi
clementi / tothedeath
Last active January 30, 2024 16:14
Run a shell command repeatedly until it fails
#! /usr/bin/env python3
import subprocess
from sys import argv
def main():
if len(argv) < 2:
print('Usage: {} <shell command>'.format(argv[0]))
exit(1)
@clementi
clementi / init.vim
Created February 19, 2022 18:52
Neovim init.vim for compatibility with Vim
set runtimepath^=~/.vim runtimepath+=~/.vim/after
let &packpath=&runtimepath
source ~/.vim/vimrc
@clementi
clementi / Main.scala
Created May 21, 2021 21:28
lspath in Scala 3 with Cats and Cats Effect
import cats.effect.ExitCode
import cats.effect.IO
import cats.effect.IOApp
import cats.implicits._
import java.io.File
object Main extends IOApp:
override def run(args: List[String]): IO[ExitCode] =
for
path <- getPath
@clementi
clementi / java-libraries.md
Last active August 31, 2022 23:04
Java Libraries

Java Libraries

A curated List of useful or interesting libraries for Java programming.

Name Description URL
Akka Akka is a toolkit for building highly concurrent, distributed, and resilient message-driven applications for Java and Scala. https://akka.io
Akka HTTP The Akka HTTP modules implement a full server- and client-side HTTP stack on top of akka-actor and akka-stream. https://doc.akka.io/docs/akka-http/current
Akka Stream The purpose is to offer an intuitive and safe way to formulate stream processing setups such that we can then execute them efficiently and with bounded resource usage—no more OutOfMemoryErrors. https://doc.akka.io/docs/akka/current/stream
Alpakka The Alpakka project is an open source initiative to implement stream-aware and reactive integration pipelines for Java and Scala. https://doc.akka.io/docs/alpakka/current
@clementi
clementi / .scalafmt.conf
Created April 22, 2021 07:05
Scalafmt Configuration
version = "2.7.4"
align.preset = more
align.multiline = true
maxColumn = 100
@clementi
clementi / sbt-plugins.md
Last active May 25, 2021 20:36
sbt plugins
@clementi
clementi / scala-libraries-and-tools.md
Last active October 28, 2022 22:42
Scala Libraries and Tools

Scala Libraries and Tools

A curated List of useful or interesting libraries and tools for Scala programming. See also the Scala Toolbox.

Libraries

Name Description URL
Akka HTTP The Akka HTTP modules implement a full server- and client-side HTTP stack on top of akka-actor and akka-stream. https://doc.akka.io/docs/akka-http/current
Akka Stream The purpose is to offer an intuitive and safe way to formulate stream processing setups such that we can then execute them efficiently and with bounded resource usage—no more OutOfMemoryErrors. https://doc.akka.io/docs/akka/current/stream
@clementi
clementi / g8-templates.md
Last active March 15, 2022 22:42
Useful Giter8 Templates

Useful Giter8 Templates

Name Description
akka/akka-quickstart-scala.g8 A minimal seed template for an Akka with Scala build
clementi/cats-effect-seed.g8 Scala SBT project with Cats and Cats-Effect
devinsideyou/scala3-seed.g8 A Giter8 template for a fully configured Scala3 SBT single but multibuild ready project. It is configured in a slightly opinionated but mostly dependency free fashion.
http4s/http4s.g8 Scala SBT project with http4s
scala/scala-seed.g8 Barebones Scala SBT project
scala/scala3-cross.g8 Scala 3 and Scala 2 cross-compiled sbt template
@clementi
clementi / main.c
Last active March 3, 2021 22:47
Calculate pi by using the formula pi/4 = 1/1 - 1/3 + 1/5 - 1/7 + 1/9 - ...
#include <stdio.h>
#include <stdlib.h>
double calc_pi(int terms) {
double sum = 0;
for (int n = 0; n <= 2 * terms; n++) {
double term = 1.0 / (2 * n + 1);
if (n % 2 == 0) {
sum += term;
@clementi
clementi / Public_Time_Servers.md
Created January 27, 2021 23:52 — forked from mutin-sa/Top_Public_Time_Servers.md
List of Top Public Time Servers

Google Public NTP [AS15169]:

time.google.com

time1.google.com

time2.google.com

time3.google.com