Skip to content

Instantly share code, notes, and snippets.

View rudogma's full-sized avatar

Mikhail Savinov rudogma

View GitHub Profile
@LMnet
LMnet / StreamPriorityUtils.scala
Last active May 26, 2020 15:37
StreamPriorityUtils
import cats.Applicative
import cats.data.NonEmptyList
import cats.effect.Concurrent
import cats.effect.concurrent.{Deferred, Ref}
import cats.implicits._
import fs2.concurrent.{InspectableQueue, SignallingRef}
import fs2.{Chunk, CompositeFailure, Scope, Stream}
object StreamPriorityUtils {
@milessabin
milessabin / gist:61860a59a93184c0c5df
Created August 10, 2014 13:11
A better implicitly ... trick for generating a stable identifier due to @xeno_by and @den_sh
scala> :paste
// Entering paste mode (ctrl-D to finish)
import scala.language.dynamics
import scala.language.experimental.macros
import scala.reflect.macros.whitebox
object implicitly extends Dynamic {
def apply[T](implicit t: T): T {} = t
@jaxbot
jaxbot / gist:5748513
Created June 10, 2013 12:58
Block nginx from serving .git directories
location ~ /\.git {
deny all;
}
# or, all . directories/files in general (including .htaccess, etc)
location ~ /\. {
deny all;
}
@P7h
P7h / IntelliJ_IDEA__Perf_Tuning.txt
Last active October 21, 2024 01:10
Performance tuning parameters for IntelliJ IDEA. Add these params in idea64.exe.vmoptions or idea.exe.vmoptions file in IntelliJ IDEA. If you are using JDK 8.x, please knock off PermSize and MaxPermSize parameters from the tuning configuration.
-server
-Xms2048m
-Xmx2048m
-XX:NewSize=512m
-XX:MaxNewSize=512m
-XX:PermSize=512m
-XX:MaxPermSize=512m
-XX:+UseParNewGC
-XX:ParallelGCThreads=4
-XX:MaxTenuringThreshold=1