Skip to content

Instantly share code, notes, and snippets.

Enguerran enguerran

Block or report user

Report or block enguerran

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 DecodeJson.elm
module DecodingJson exposing (..)
import Http
import Html exposing (..)
import Html.Attributes exposing (href)
import Html.Events exposing (onClick)
import Json.Decode exposing (string, int, list, Decoder)
import Json.Decode.Pipeline exposing (decode, required, optional)
enguerran /
Last active Jul 12, 2018
Senior Software Craftsmanship Rules

Senior Software Craftsmanship Rules

  1. master of code
    • remember your first steps
    • stay humble
    • learn technologies
    • pair with others
    • enjoy
  2. other rules #2…#5
    • talk about your experience, teach others
enguerran /
Last active Apr 4, 2018
Find the commit that creates a specific file

Let's say the build configuration of HEAD creates a file.

But we know for sure that the build configuration of remove.sourcemap does not create a file.

And we want to know when and how this file is now created.

git bisect is very good for that, here is how:

git bisect start HEAD remove.sourcemap
enguerran / google-contacts.json
Created Mar 20, 2018
google contacts sample
View google-contacts.json
"resourceName": "people/c6437718916715038152",
"metadata": {
"sources": [
"type": "CONTACT",
"id": "59575f3f0a9cc5c8",
enguerran /
Last active Oct 16, 2017
[COZY] performance de recherche cozy-drive

Mise en place

Création de 100 fichiers testfile-x à la racine.


Une premiére série donne ces chiffres quand on tape 4 (19 résultats donc) :

SuggestionProvider.jsx:49 defineIndex: 52.243896484375ms
enguerran /
Created Sep 27, 2017
Organisation de cozy-ui

variables et conventions

NB : l'implémentation reste un détail mais on peut imaginer avoir un json, un fichier css avec des variables, un fichier sass avec des variables, etc.

:root {
  --color-red: #f52d2d;
  --color-purple: #a75bcb;
  --color-blue: #2d8af2;
enguerran / App.js
Last active Sep 21, 2017
react-native development
View App.js
import React from "react";
import {
} from "react-native";
View createSharingRecipient.js
const createRecipient = (email) => cozy.client.fetchJSON('POST', '/sharings/recipient', {
enguerran / Counter.jsx
Last active Aug 9, 2017
React Tips & Tricks
View Counter.jsx
import React from "react";
const style = {
fontSize: "100px",
cursor: "pointer",
userSelect: "none",
mozUserSelect: "none",
webkitUserSelect: "none",
msUserSelect: "none"
You can’t perform that action at this time.