Run two Claude Code accounts simultaneously on macOS without re-authenticating by using separate configuration directories.
- Create Separate Config Directories
mkdir ~/.claude-account1 mkdir ~/.claude-account2
| #!/bin/bash | |
| ## This gist contains instructions about cuda v11.1 and cudnn 7.6 installation in Ubuntu 20.04 for Tensorflow 2.1.0 | |
| ### steps #### | |
| # verify the system has a cuda-capable gpu | |
| # download and install the nvidia cuda toolkit and cudnn | |
| # setup environmental variables | |
| # verify the installation | |
| ### |
cats-effect Resource is extremely handy for managing the lifecycle of stateful resources, for example database or queue connections. It gives a main interface of:
trait Resource[F[_], A] {
/** - Acquire resource
* - Run f
* - guarantee that if acquire ran, release will run, even if `use` is cancelled or `f` failsSome of these practices might be based on wrong assumptions and I'm not aware of it, so I would appreciate any feedback.
avoiding some dependency conflicts:
~/.sbt/{0.13,1.0}/plugins/plugins.sbtundeclaredCompileDependencies and make the obvious missing dependencies explicit by adding them to libraryDependencies of each sub-projectunusedCompileDependencies and remove some obvious unused libraries. This has false positives, so ; reload; Test/compile after each change and ultimately run all tests to see that it didn't break anythingundeclaredCompileDependenciesTest to the CI pipeline, so that it will fail if you have some undeclared dependencieskeeping dependencies up to date and resolving conflicts:
Nexus 2.x had a REST API to download artifacts like below based on some Maven GAV co-ordinates but this no longer works for Nexus 3.x
Nexus 2.x had a REST API to download artifacts based on some Maven GAV co-ordinates
wget "http://local:8081/service/local/artifact/maven/redirect?g=com.mycompany&a=my-app&v=LATEST" --content-disposition
or
There's so many way to send logs to an elk... logspout, filebeat, journalbeat, etc.
But docker has a gelf log driver and logstash a gelf input. So here we are.
Here is a docker-compose to test a full elk with a container sending logs via gelf.
| import akka.actor.ActorSystem | |
| import akka.stream._ | |
| import akka.stream.scaladsl.{Flow, GraphDSL, Keep, RunnableGraph, Sink, Source} | |
| import akka.stream.stage.{GraphStage, GraphStageLogic, InHandler, OutHandler} | |
| import akka.testkit.TestKit | |
| import org.scalatest.{BeforeAndAfterAll, Matchers, WordSpecLike} | |
| import scala.concurrent.Await | |
| class CombineLatest[A, B] |
| def debug[T](value: sourcecode.Text[T], tag: String = "") | |
| (implicit pprinter: pprint.PPrint[T], | |
| path: sourcecode.Enclosing, | |
| line: sourcecode.Line, | |
| cfg: Config = pprint.Config.Colors.PPrintConfig)= { | |
| val titleIter = path.value.split(" |#|\\.").filter(!_.contains("$")).last | |
| val tagIter = | |
| if (tag == "") "" | |
| else " " + pprint.tokenize(tag).mkString |
| package protoser | |
| import java.util.concurrent.atomic.AtomicReference | |
| import akka.actor.ExtendedActorSystem | |
| import akka.serialization.BaseSerializer | |
| import com.trueaccord.scalapb.GeneratedMessageCompanion | |
| class ScalaPbSerializer(val system: ExtendedActorSystem) extends BaseSerializer { | |
| private val classToCompanionMapRef = new AtomicReference[Map[Class[_], GeneratedMessageCompanion[_]]](Map.empty) |