This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
trait DynamoWriteItem { | |
def id: String | |
} | |
trait DynamoService { | |
def writeBatch(dynamoWriteItems: List[DynamoWriteItem]): Future[Either[List[DynamoWriteItem], Done]] | |
} | |
object DynamoWriteStream { | |
def batchedFlow[PassThrough]( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.concurrent.atomic.AtomicInteger | |
import java.util.concurrent.{ArrayBlockingQueue, ThreadPoolExecutor, TimeUnit} | |
import akka.actor.ActorSystem | |
import akka.http.scaladsl.Http | |
import akka.http.scaladsl.model.{HttpRequest, HttpResponse} | |
import akka.http.scaladsl.server.Directives._ | |
import akka.stream.ActorMaterializer | |
import akka.stream.scaladsl.{Keep, Sink} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Prototype version 15 | |
Found device 138a:0097 | |
step 1 | |
usb write: | |
0000 01 | |
usb read: | |
0000 00 00 f0 b0 5e 54 a4 00 00 00 06 07 01 30 00 01 | |
0010 00 00 61 13 88 35 41 9d 00 23 00 00 00 00 01 00 | |
0020 00 00 00 00 00 07 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# I have 3 btrfs subvolume /root, /home, /nix-store and these are used as the name suggest | |
# Now, when i create new nixos configuration i can make a snapshot of root and home, before i switch to a new config. | |
CURRENT_GENERATION=`readlink /nix/var/nix/profiles/system | cut -d'-' -f2`; echo Determined current generation: $CURRENT_GENERATION | |
sudo mkdir -p /btrfs | |
# the / is not mounted in my btrfs filesystem by default, because my filesystem root is the /root subvolume | |
sudo mount /dev/mapper/NixOS /btrfs | |
sudo btrfs subvolume snapshot /btrfs/root /btrfs/root-$CURRENT_GENERATION-snapshot | |
# I also make a snapshot of home, because i use gnome or KDE, which contains a lots of config and cache, which can broke by a rollback. | |
sudo btrfs subvolume snapshot /btrfs/home /btrfs/home-$CURRENT_GENERATION-snapshot |