Skip to content

Instantly share code, notes, and snippets.

View jeffreybaird's full-sized avatar

Jeffrey Baird jeffreybaird

View GitHub Profile
  • 1 lb Impossible Ground Meat
  • 1/2 cup bread crumbs
  • 1/4 non-dairy milk
  • 1/2 teaspoon salt
  • 1/2 teaspoon vegan Worcestershire sauce
  • 1/4 teaspoon pepper
  • 1 small onion, finely chopped (1/4 cup)
  • 1 egg's worth of vegan egg replacer (I use Neat egg).
  1. Heat oven to 400°F. Line 13x9-inch pan with foil; spray with cooking spray.
@jeffreybaird
jeffreybaird / impossibleMeatballs.md
Created January 22, 2020 14:57
Impossible Meatballs

1 lb Impossible Ground Meat 1/2 cup bread crumbs 1/4 non-dairy milk 1/2 teaspoon salt 1/2 teaspoon vegan Worcestershire sauce 1/4 teaspoon pepper 1 small onion, finely chopped (1/4 cup) 1 egg's worth of vegan egg replacer (I use Neat egg).

1 Heat oven to 400°F. Line 13x9-inch pan with foil; spray with cooking spray.

efmodule Rumbl.UserController do
use Rumbl.Web, :controller
alias Rumbl.User
def index(conn, _params) do
case authenticate(conn) do
%Plug.Conn{halted: true} = conn ->
conn
conn ->
users = Repo.all(User)
-- TYPE MISMATCH -------------------------------------------- test/ball_test.elm
The 2nd argument to function `withinBrick` is causing a mismatch.
38│ Ball.withinBrick ball brick
^^^^^
Function `withinBrick` is expecting the 2nd argument to be:
{ color : Color.Color, vx : Float, vy : Float, x : Float, y : Float }
@jeffreybaird
jeffreybaird / breakout.elm
Created April 15, 2016 19:33
Pertinent functions to breakout
type alias Game =
{
state : State
, player : Player
}
type State = Play | Pause
type alias Player =
Object {score : Int}
puts('. '* 31 +'.')
puts(('. '* 7) + ('X ' * 17) + ('. ' * 8))
puts(('. '* 6) + 'X ' + ('. ' * 17) + 'X ' + ('. ' * 7))
puts(('. '* 5) + 'X ' + ('. ' * 19) + 'X ' + ('. ' * 6))
puts(('. '* 4) + 'X ' + ('. ' * 21) + 'X ' + ('. ' * 5))
puts(('. '* 3) + 'X ' + ('. ' * 23) + 'X ' + ('. ' * 4))
puts(('. '* 2) + 'X ' + ('. ' * 25) + 'X ' + ('. ' * 3))
puts(('. '* 3) + 'X ' + ('. ' * 23) + 'X ' + ('. ' * 4))
puts(('. '* 4) + 'X ' + ('. ' * 21) + 'X ' + ('. ' * 5))
puts(('. '* 5) + 'X ' + ('. ' * 19) + 'X ' + ('. ' * 6))
@jeffreybaird
jeffreybaird / linnked_list.rb
Created December 4, 2015 20:59
A linked list implementation
class LinkedList
attr_reader :tail
def initialize(head=nil, tail=NullList.new())
raise ArgumentError unless tail.is_a?(LinkedList) || tail.is_a?(NullList)
@head = head.is_a?(Head) ? head : Head.new(head)
@tail = tail
end
def head
@jeffreybaird
jeffreybaird / question.md
Last active June 22, 2016 18:29
Question about the phoenix.gen.json generator.
$mix phoenix.new testapi
$cd testapi
$mix ecto.create
$mix phoenix.gen.json User users fullname:string email:string

Add the resource to your api scope in web/router.ex:

resources "/users", UserController, except: [:new, :edit]

under the api block

Node '[email protected]' not responding to pings.
config is OK
Exec: /usr/local/Cellar/riak/1.4.8/libexec/erts-5.9.1/bin/erlexec -boot /usr/local/Cellar/riak/1.4.8/libexec/releases/1.4.8/riak -config /usr/local/Cellar/riak/1.4.8/libexec/etc/app.config -pa /usr/local/Cellar/riak/1.4.8/libexec/lib/basho-patches -args_file /usr/local/Cellar/riak/1.4.8/libexec/etc/vm.args -- console
Root: /usr/local/Cellar/riak/1.4.8/libexec
{error_logger,{{2014,6,10},{9,6,37}},"Protocol: ~p: register error: ~p~n",["inet_tcp",{{badmatch,{error,duplicate_name}},[{inet_tcp_dist,listen,1,[{file,"inet_tcp_dist.erl"},{line,70}]},{net_kernel,start_protos,4,[{file,"net_kernel.erl"},{line,1314}]},{net_kernel,start_protos,3,[{file,"net_kernel.erl"},{line,1307}]},{net_kernel,init_node,2,[{file,"net_kernel.erl"},{line,1197}]},{net_kernel,init,1,[{file,"net_kernel.erl"},{line,357}]},{gen_server,init_it,6,[{file,"gen_server.erl"},{line,304}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,227}]}]}]}
-----BEGIN PGP MESSAGE-----
Version: Keybase OpenPGP v0.1.1
Comment: https://keybase.io/crypto
wcBMA7m3rH38ud1BAQf9GSKMVwzMQbBiFDYI+L/3X2XdDl/Kq9QZNSq3350MPkJI
vNHaZdcCCrOMf8yksG3cQjgK373bU2YWU5i2eyUZzHMzpntC8MLPT2hr27PBIOvL
HjB7KXchfDJfReIEJRUdFMsZjgPqsNkbofLg/kB3ZeA86FkV/nixMTbdwS3Iaska
SVziby35cHHODIEp6wGVOwQO9BrrN8pFjRfNI1MflOIVKaY4laCds3hMZDVRVMo7
HIX2ULaA4otw+Ocob1gT/Eo4Z3xVBd7N2mxgnYNMl9LILMZdNM+V/FtXCFlcnVHJ
wFa0RTdJ3/YilTRzTC3FThcioyQSSy7JBgNOOyICOtLA9gEuetDo/uRxsewaBUP8