Skip to content

Instantly share code, notes, and snippets.

View sandeshsoni's full-sized avatar
👨‍💻
searching work

Sandesh Soni sandeshsoni

👨‍💻
searching work
View GitHub Profile
@sandeshsoni
sandeshsoni / board.ex
Last active June 15, 2020 09:05
Tetris models
defmodule Tetris.Core.Board do
alias Tetris.Core.Shape
@default_width 40
@default_height 50
defstruct ~w(
tiles
seq_map
@sandeshsoni
sandeshsoni / Category
Last active August 9, 2019 08:39
Ecto basics, Build simple app
defmodule Ecom.Cat do
end
@sandeshsoni
sandeshsoni / blog_articles.json
Last active November 21, 2016 11:44
articles
[]
@sandeshsoni
sandeshsoni / intro.ex
Created February 6, 2016 03:40
Introducing Elixir to Rubyist
# This is a comment
# The first thing in any language
next_integer_after = fn x -> x+1
end
# This is an annoymous function.
# called inside function as next_integer_after(3)
defmodule ModuleName do
@sandeshsoni
sandeshsoni / setup.ex
Last active December 29, 2015 08:14
Elixir code sample. Functions, anonymous function
defmodule Setup do
def process vehicle do
root_path = fn ->
Car.folder_path vehicle
end
generate_labels root_path.(), vehicle
create_sheets root_path.(), vehicle.sheets
end