Marin Headlands High Dynamic Range Image

Marin Headlands Sunset

Seafood Curry




Ingredients:

  • 14 oz coconut milk
  • 2 tbsps curry paste
  • 1/2 cup pumpkin pureed
  • 1/4 cup water
  • 3 tbsps fish sauce
  • 1 tspn brown sugar
  • 1 bunch basil leaves
  • 6 lime leaves or 1 lime juiced
  • shrimp and fish
  • 3 tbsps olive oil (or palm oil)
  • 1 green pepper
  • 1 cup peas
  • 1 chile pepper




Vegetarian Dumplings




Ingredients

  • fake ground beef
  • asparagus
  • basil
  • onion
  • scallions
  • fennel
  • garlic
  • snap peas
  • red cabbage
  • wonton wrappers
  • butter
  • one egg
  • soy sauce






Soba Noodle Soup with Poached Egg And Avocado

Ingredients:
vegetable broth
soba noodles
shaved fennel
mushrooms - Crimini or Shitake
chives
garlic
ginger
egg
avocado
snow Peas

Baccala Salad

Ingredients:
dried salt cod
fennel
red onion
green olives
cherry tomatoes
garlic
celery
chile peppers
parsley

Soba Noodles: Part Two

Drop all databases matching prefix

Shell script to drop all MySQL databases with the prefix ‘rupture’:

mysql -u user_name -e 'show databases' |
grep '^rupture' |
xargs -I "@@" echo mysql -u user_name -e '"DROP DATABASE @@"' > temp

chmod +x temp
./temp


Nika Raincoat Shark

Erlang MySQL Stored Procedure Support

github.com/JacobVorreuter/erlang_mysql

If you’re getting the following exception trying to call a stored procedure or prepared statement with the Erlang MySQL library you must apply this patch to mysql_auth.erl inorder to add multi-results and multi-statements to the caps list:

{error,{mysql_result,[],[],0,<<"#0A000PROCEDURE
dbname.procname can't return a result set in the given context">>}}



@@ -27,6 +27,8 @@
 -define(LONG_PASSWORD, 1).
 -define(LONG_FLAG, 4).
 -define(PROTOCOL_41, 512).
+-define(CLIENT_MULTI_STATEMENTS, 65536).
+-define(CLIENT_MULTI_RESULTS, 131072).
 -define(TRANSACTIONS, 8192).
 -define(SECURE_CONNECTION, 32768).
 -define(CONNECT_WITH_DB, 8).
@@ -121,7 +123,8 @@ make_new_auth(User, Password, Database) ->
          ?CONNECT_WITH_DB
        end,
     Caps = ?LONG_PASSWORD bor ?LONG_FLAG bor ?TRANSACTIONS bor
-	?PROTOCOL_41 bor ?SECURE_CONNECTION bor DBCaps,
+	?PROTOCOL_41 bor ?SECURE_CONNECTION bor
+	?CLIENT_MULTI_STATEMENTS bor ?CLIENT_MULTI_RESULTS bor DBCaps,
     Maxsize = ?MAX_PACKET_SIZE,
     UserB = list_to_binary(User),
     PasswordL = size(Password),

Erlang Documentation Shell Command

I spend a lot of time looking things up in the man pages on erlang.org. Here’s how to setup a nice shortcut if you’re a mac user:


$> echo -e '#!/bin/sh\nopen http://erlang.org/doc/man/$1.html\n' > erld
$> chmod +x erld
$> sudo mv erld /usr/local/bin/

Now you can do:

$> erld lists

This runs “open http://erlang.org/doc/man/lists.html”

Enjoy!