Skip to content

Instantly share code, notes, and snippets.

View reiddraper's full-sized avatar
🍹

Reid Draper reiddraper

🍹
View GitHub Profile
<html>
<head>
<title>This is the title</title>
</head>
</html>
{-# LANGUAGE TemplateHaskell #-}
module Main
where
import System.Environment (getArgs)
import Data.ByteString.Char8 (pack)
import Control.Distributed.Process (say, Process, spawnLink, RemoteTable)
import Control.Distributed.Process.Node (newLocalNode, initRemoteTable, runProcess, localNodeId, LocalNode(..))
import Control.Distributed.Process.Internal.Types (NodeId(..))
{-# LANGUAGE TemplateHaskell #-}
module Main
where
import System.Environment (getArgs)
import Data.ByteString.Char8 (pack)
import Control.Distributed.Process (say, Process(..), spawn, RemoteTable(..))
import Control.Distributed.Process.Node (newLocalNode, initRemoteTable, runProcess, localNodeId, LocalNode(..))
import Control.Distributed.Process.Internal.Types (NodeId(..))
80 grams (about 1 cup whole beans) coffee
2 cups room temperature water
Makes about 3 iced-coffee
Grind beans coarsely, I used one setting below the coarsest. Mix water and coffee into a container, cover, and let sit for 10 hours.
After, filter the brewed coffee as best you can. The result will be strong, too strong to drink. I suggest diluting with 0.5:1.0 water to brew.
Pour over ice, or, heat.

Keybase proof

I hereby claim:

  • I am reiddraper on github.
  • I am reiddraper (https://keybase.io/reiddraper) on keybase.
  • I have a public key ASCTgRUWMsnLUEBwyA44G_kTvXoTxwmpb2DIRVET0WxXYwo

To claim this, I am signing this object:

Debugging Erlang Applications In Real Time

Reid Draper @reiddraper

We'll be using a tool called redbug, which is an abstraction and safety layer of Erlang's built-in dbg tracing facilities. You can follow along at home:

terraform plan -var-file terraform.tfvars -out terraform.tfplan
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but
will not be persisted to local or remote state storage.
aws_ebs_volume.build-freebsd-01_sdf: Refreshing state... (ID: vol-1291439a)
aws_ebs_volume.pg6_sdh: Refreshing state... (ID: vol-33cb1587)
aws_ebs_volume.pg7_sdf: Refreshing state... (ID: vol-3b9f4db3)
aws_eip.nat-2a: Refreshing state... (ID: eipalloc-cb74a9ac)
aws_ebs_volume.build-debian-01_sdf: Refreshing state... (ID: vol-65a266e6)

on the guest SmartOS VM

pkg_add http://pkgsrc.joyent.com/sdc6/2012Q1/i386/All/smtools
# note this is going to shut down the VM
sm-prepare-image

on the global zone

select(2, [0 1], NULL, NULL, {900, 0}) = 1 (in [0], left {899, 949910})
wait4(1401, 0x7fffe90edd0c, WNOHANG, NULL) = 0
read(0, "10:53:10.322 [error] Supervisor "..., 8192) = 438
lseek(2, 0, SEEK_END) = 90736
write(2, "10:53:10.322 [error] Supervisor "..., 438) = 438
select(2, [0 1], NULL, NULL, {900, 0}) = 1 (in [0], left {899, 958221})
wait4(1401, 0x7fffe90edd0c, WNOHANG, NULL) = 0
read(0, "10:53:14.135 [error] Supervisor "..., 8192) = 461
lseek(2, 0, SEEK_END)
dd if=/dev/zero of=/tmp/output bs=25k count=1k
for i in {1..10}; do time curl -X PUT localhost:8098/riak/foo/a --data-binary @/tmp/output > foo; done