Skip to content

Instantly share code, notes, and snippets.

%% @doc Implements code-generation using syntax_tools.
-module(neotoma_generate).
-include("neotoma.hrl").
-compile(export_all).
-import(erl_syntax, [
application/3,
abstract/1,
case_expr/2,
clause/3,
variable/1,
$ bin/rails console
Loading development environment (Rails 4.1.7)
irb(main):001:0> Article.search_for_ids "crisis"
Sphinx Query (3.0ms) SELECT * FROM `article_core` WHERE MATCH('crisis') AND `sphinx_deleted` = 0 LIMIT 0, 20
(Object doesn't support #inspect)
=>
irb(main):002:0> _.to_a
Sphinx Retrying query "SELECT * FROM `article_core` WHERE MATCH('crisis') AND `sphinx_deleted` = 0 LIMIT 0, 20; SHOW META" after error: Lost connection to MySQL server during query - SELECT * FROM `article_core` WHERE MATCH('crisis') AND `sphinx_deleted` = 0 LIMIT 0, 20; SHOW META
Sphinx Query (1.7ms) SELECT * FROM `article_core` WHERE MATCH('crisis') AND `sphinx_deleted` = 0 LIMIT 0, 20
NoMethodError: undefined method `inject' for nil:NilClass
-module(crdt_mapred).
-compile(export_all).
%% @doc Map phase function for returning CRDT set values as lists of lists
map_set_value(RiakObject, _, _) ->
[riak_kv_crdt:set_value(RiakObject)].
%% @doc Map phase function for returning CRDT set values wrapped in JSON-like objects
map_set_value_json(RiakObject, _, _) ->
[{struct, [{set, riak_kv_crdt:set_value(RiakObject)}]}].
;; erlang-mode and customizations
(add-to-list 'load-path "/Users/sean/erlang/R16B02/lib/erlang/lib/tools-2.6.12/emacs")
(add-to-list 'exec-path "/Users/sean/erlang/R16B02/bin")
(setq erlang-root-dir "/Users/sean/erlang/R16B02/lib/erlang")
(require 'erlang-start)
(require 'erlang-flymake)
(setq erlang-flymake-command "/Users/sean/erlang/R16B02/bin/erlc")
# Erlang switching
export PATH="$HOME/erlang/current/bin:$PATH"
# Detects the current erlang version
erlcur() {
DIR=`ls -lr $HOME/erlang | awk '/current/ { print $NF }'`
echo -n ${DIR##*/}
}
# Switches to the given erlang version using wildcards
%% @doc Reports on percentage of modules, functions and types that are
%% documented.
-module(edoc_stats).
-export([file/1, file/2, files/1, files/2, aggregate/1, report/1, report_files/1, report_files/2]).
-include_lib("xmerl/include/xmerl.hrl").
-import(xmerl_xpath, [string/2]).
-define(QUERY_FUNS, [ fun module_has_description/2
, fun functions_have_descriptions/2
, fun types_have_descriptions/2
Last 10 lines of the build log ( /Users/sean/.cabal/logs/protocol-buffers-2.0.14.log ):
Text/ProtocolBuffers/WireMessage.hs:407:24: Not in scope: ‘typeOf’
Text/ProtocolBuffers/WireMessage.hs:433:77: Not in scope: ‘typeOf’
Text/ProtocolBuffers/WireMessage.hs:436:75: Not in scope: ‘typeOf’
Text/ProtocolBuffers/WireMessage.hs:440:74: Not in scope: ‘typeOf’
isotime({{Y,Mo,D},{H,Mi,S}}) ->
ISO = io_lib:format("~w-~.2.0w-~.2.0wT~.2.0w:~.2.0w:~6.3.0fZ",
[Y, Mo, D, H, Mi, S]),
unicode:characters_to_binary(ISO).

Okay, here are some of my tips about how I work with the pizza dough. For now, I'd suggest just buying the dough until you're comfortable, then once you've got the basic techniques down you can start experimenting and/or making your own dough. We get ours at Whole Foods (it's about $5/ball, it's 22 oz., and it'll make about three pizzas on the Baking Steel), but you can get it from a grocery store that makes pizzas or a pizza restaurant.. They'll usually sell it to you if you ask for it. I describe my process with the 3-pizza thing in mind.

Setting the stage

When you buy your dough it will usually be cold, and that cold is the enemy of smooth pizza making. You'll need to let the dough come to room temperature: We usually pull out three round plastic Ziploc containers, spray the containers lightly with non-stick kitchen spray, plop the cold dough into the container, then spray a small square of regular Saran wrap lightly with non-stick spray and cover the top of the containers. You want to block out the o

src/riak.erl:183: {error, notfound} ->
src/riak_client.erl:71:%% {error, notfound} |
src/riak_client.erl:105: notfound ->
src/riak_client.erl:106: {error, notfound};
src/riak_client.erl:114:%% {error, notfound} |
src/riak_client.erl:134:%% {error, notfound} |
src/riak_client.erl:148:%% {error, notfound} |
src/riak_client.erl:246:%% {error, notfound} |
src/riak_client.erl:312:%% {error, notfound} |
src/riak_client.erl:323:%% {error, notfound} |