| name | code-review-turbo | ||||
|---|---|---|---|---|---|
| description | Run a triple-agent code review on the current branch's PR. Waits for Cursor Bugbot, runs a Claude sub-agent and Codex in parallel, then cross-references all findings to filter out hallucinations. Use when you want a thorough, multi-perspective code review before merging. | ||||
| metadata |
|
||||
| allowed-tools | Bash(gh:*) Bash(codex:*) Bash(cat:*) Bash(tee:*) Bash(sleep:*) Agent Read Grep Glob Write(/tmp/*) |
All things considered, our experience in Scala Native has shown that resource management in Scala is way harder than it should be. This gist presents a simple design pattern that makes it resource management absolutely hassle-free: scoped implicit lifetimes.
The main idea behind it is to encode resource lifetimes through a concept of an implicit scope. Scopes are necessary to acquire resources. They are responsible for disposal of the resources once the evaluation exits the
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| package com.codetinkerhack | |
| import akka.actor.{ ActorRef, Props, Actor, ActorLogging } | |
| import akka.pattern.ask | |
| import akka.util.Timeout | |
| import scala.concurrent.duration._ | |
| import akka.actor.Actor.Receive | |
| import akka.pattern.pipe | |
| import scala.util.Success | |
| import scala.util.Failure |
wget --no-check-certificate https://raw.github.com/seebi/dircolors-solarized/master/dircolors.ansi-dark
mv dircolors.ansi-dark .dircolors
eval `dircolors ~/.dircolors`
git clone https://github.com/sigurdga/gnome-terminal-colors-solarized.git
cd gnome-terminal-colors-solarized
./set_dark.sh
| package json | |
| import reactivemongo.bson._ | |
| import reactivemongo.bson.handlers.DefaultBSONHandlers._ | |
| import play.api.libs.json._ | |
| import play.api.libs.json.Json._ | |
| import play.api.libs.json.util._ | |
| import play.api.libs.json.Writes._ | |
| import play.api.libs.functional.syntax._ |
| package daos | |
| import scala.concurrent.ExecutionContext | |
| import scala.concurrent.Future | |
| import play.api.Play.current | |
| import play.modules.reactivemongo._ | |
| import reactivemongo.api._ | |
| import reactivemongo.api.indexes._ | |
| import reactivemongo.bson._ | |
| import reactivemongo.bson.handlers.BSONReader |
Asynchronicity is the price to pay, you better know what you're paying for...
Let's share some vocabulary first:
Thread: The primitive responsible of executing code on the processor, you can give an existing (or a new) Thread some code, and it will execute it. Normally you can have a few hundreds on a JVM, arguments that you can tweak your way out to thousands. Worth noting that multitasking is achieved when using multiple Threads. Multiple Threads can exist for a single processor in which case multitasking happens when this processor switches between threads, called context switching, which will give the impression of things happenning in parallel. An example of a direct, and probably naive, use of a new Thread in Java:
public class MyRunnable implements Runnable {
public void run(){
System.out.println("MyRunnable running");| package controllers | |
| import play.api._ | |
| import play.api.mvc._ | |
| object Application extends Controller { | |
| def zip = Action { | |
| import play.api.libs.iteratee._ | |
| import java.util.zip._ |
| # --- !Ups | |
| CREATE TABLE users( | |
| email VARCHAR(255) NOT NULL PRIMARY KEY, | |
| name VARCHAR(255) | |
| ); | |
| CREATE TABLE subjects( | |
| id INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY, | |
| title LONGTEXT NOT NULL, |