Skip to content

Instantly share code, notes, and snippets.

Sean Cribbs seancribbs

Block or report user

Report or block seancribbs

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View erlang.el
;; 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")
View crdt_mapred.erl
-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)}]}].
View gist:52af4d838f376d745513
$ 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
View neotoma_generate.erl
%% @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,
View .bash_profile
# Customizations
. ~/.bash/colors.sh
. ~/.bash/editor.sh
. ~/.bash/git.sh
. ~/.bash/erlang.sh
. ~/.bash/ruby.sh
. ~/.bash/ghc.sh
. ~/.bash/prompt.sh
. ~/.bash/gif.sh
View keybase.md

Keybase proof

I hereby claim:

  • I am seancribbs on github.
  • I am seancribbs (https://keybase.io/seancribbs) on keybase.
  • I have a public key whose fingerprint is C40B E0F2 EA7F B696 8D69 E1D1 2AAA 6B61 8089 7A6C

To claim this, I am signing this object:

View gist:1c59b5dc1aa50b83c53e
** (Protocol.UndefinedError) protocol String.Chars not implemented for {:git, 'git://github.com/basho/lager.git', {:tag, '2.1.1'}}
(elixir) lib/string/chars.ex:3: String.Chars.impl_for!/1
(elixir) lib/string/chars.ex:17: String.Chars.to_string/1
(mix) lib/mix/rebar.ex:122: Mix.Rebar.compile_req/1
(mix) lib/mix/rebar.ex:88: Mix.Rebar.parse_dep/2
(elixir) lib/enum.ex:977: anonymous fn/3 in Enum.map/2
(elixir) lib/enum.ex:1261: Enum."-reduce/3-lists^foldl/2-0-"/3
(elixir) lib/enum.ex:977: Enum.map/2
(mix) lib/mix/dep/loader.ex:250: anonymous fn/2 in Mix.Dep.Loader.rebar_children/1
View ehaml.erl
-module(ehaml).
-compile(export_all).
% -export([indentation_level/1, split_lines/1, strip_indentation/1, is_tag/1]).
-define(CR, 13).
-define(LF, 10).
-define(SPACE, 32).
-define(PERCENT, $%).
-define(APOS, $').
View twitter.erl
%%%-------------------------------------------------------------------
%%% File: twitter.erl
%%% @author Sean Cribbs <seancribbs@gmail.com> []
%%% @copyright 2008 Sean Cribbs
%%% @doc Bindings for the Twitter API
%%% Include 'twitter.hrl' in your module to get the records.
%%% @end
%%%
%%% @since 2008-10-30 by Sean Cribbs
%%% @type auth() = {User::string(), Password::string()}
View gist:23361
19> twitter:search("#rubyconf"). ** exception error: function_clause
in function twitter:parse_twitter_time/1
in call from twitter:parse_search_result/1
in call from mochiweb_util:urlencode/1
in call from twitter:parse_search_results/1
in call from mochiweb_util:urlencode/1
You can’t perform that action at this time.