Skip to content

Instantly share code, notes, and snippets.

Working from home

Jeremie Ges GesJeremie

Working from home
View GitHub Profile
View method.ex
def create_contact(conn, %{"classified_contact" => params, "id" => id}) do
with {:ok, conn} <-, params, %{classified_id: id}) do
|> redirect(to: app_classified_path(conn, :show, id))
{:error, conn} ->
|> show(%{"id" => id})
View operation.ex
defmodule Babysitting.Operations.Classified.CreateContactOperation do
import Plug.Conn;
alias Babysitting.Repo;
alias Babysitting.{ClassifiedContact}
alias Babysitting.Changesets.{ClassifiedContactChangeset}
def run(conn, params, options) do
conn = assign(conn, :params, params)
conn = assign(conn, :options, options)

Keybase proof

I hereby claim:

  • I am GesJeremie on github.
  • I am gesjeremie ( on keybase.
  • I have a public key whose fingerprint is 62AC 3C92 E55E 184B 6815 33EF 174E D6C5 6732 B3F1

To claim this, I am signing this object:

View list-countries-elixir.ex
countries = [
%{code: "AF", name: "Afghanistan"},
%{code: "AX", name: "Åland Islands"},
%{code: "AL", name: "Albania"},
%{code: "DZ", name: "Algeria"},
%{code: "AS", name: "American Samoa"},
%{code: "AD", name: "Andorra"},
%{code: "AO", name: "Angola"},
%{code: "AI", name: "Anguilla"},
%{code: "AQ", name: "Antarctica"},
View gist:f107c305beccb3e8b5e8
`!slack` - *Lien intégrations slack*,
`!bib admin` - Lien panel d'administration BIB,
`!finances [year]` - Lien suivi des finances,
GesJeremie / PurchaseMasterBoxTest.php
Created Jan 21, 2016
Put that under tests/functionnal/PurchaseMasterBoxTest.php
View PurchaseMasterBoxTest.php
use Illuminate\Foundation\Testing\WithoutMiddleware;
use Illuminate\Foundation\Testing\DatabaseMigrations;
use Illuminate\Foundation\Testing\DatabaseTransactions;
use Faker\Factory as Faker;
class PurchaseMasterBoxTest extends TestCase
View migration1.php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateUserOrderBuildingsTable extends Migration {
* Run the migrations.
GesJeremie / EmailExampleTest.php
Created Nov 23, 2015
Email test case for testing emails with in Phpunit
View EmailExampleTest.php
| EmailExampleTest
| Email test case for testing emails with in Phpunit
| Requirements:
| - Laravel 5.1
GesJeremie / deploy.php
Last active Apr 11, 2017
Laravel 5 example deployer
View deploy.php
* Require dependency
require_once 'recipe/common.php';
* How many releases we want to keep