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
enguerran / readme.md
Last active Jul 12, 2018
Senior Software Craftsmanship Rules
View readme.md

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
enguerran / git-bisect-run.md
Last active Apr 4, 2018
Find the commit that creates a specific file
View git-bisect-run.md

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

But we know for sure that the build configuration of remove.sourcemap does not create a .css.map 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
enguerran / google-contacts.json
Created Mar 20, 2018
google contacts sample
View google-contacts.json
[
{
"resourceName": "people/c6437718916715038152",
"etag":
"%Eh0BAgMEBQYHCAkKCwwNDg8QERITFBUXNRk0NyIlLhoMAQIDBAUGBwgJCgsMIgxWWDBmeDZMcDBjdz0=",
"metadata": {
"sources": [
{
"type": "CONTACT",
"id": "59575f3f0a9cc5c8",
@enguerran
enguerran / readme.md
Last active Oct 16, 2017
[COZY] performance de recherche cozy-drive
View readme.md

Mise en place

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

Data

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

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

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
enguerran / App.js
Last active Sep 21, 2017
react-native development
View App.js
import React from "react";
import {
StyleSheet,
Text,
View,
Platform,
ToastAndroid,
BackHandler,
CameraRoll
} from "react-native";
View createSharingRecipient.js
const createRecipient = (email) => cozy.client.fetchJSON('POST', '/sharings/recipient', {
email
})
@enguerran
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.