Skip to content

Instantly share code, notes, and snippets.

Avatar

younes meliani younesmln

  • Copenhagen
View GitHub Profile
View useGraphqlCRUD.ts
import {
TypedDocumentNode,
useMutation,
UseMutationResponse,
useQuery,
UseQueryArgs,
UseQueryResponse,
} from 'urql';
type Data<Document> = Document extends TypedDocumentNode<infer Data>
View keybase.md

Keybase proof

I hereby claim:

  • I am younesmln on github.
  • I am supernova (https://keybase.io/supernova) on keybase.
  • I have a public key whose fingerprint is EE65 9451 FB23 F649 82C0 1022 2D2B 12D5 710A F9AA

To claim this, I am signing this object:

@younesmln
younesmln / style.ts
Last active Nov 1, 2018
css in js react native styled component reuse example
View style.ts
const pickFontWeight = (
fontWeight: 'bold' | 'light',
{ fontFamilies }: Theme,
) => {
switch (fontWeight) {
case 'bold':
return css`
font-family: ${fontFamilies.boldFont};
font-weight: bold;
`;
@younesmln
younesmln / gaphqlMutation.js
Created Aug 20, 2018
seed your db with multiple mutations
View gaphqlMutation.js
const CATEGORIES = [
"Catering",
"Venue",
"Venue & Catering",
"AV/Sound",
"Transport / Logistics",
"Staff & Services",
"Platinum Sponsor",
"Diamond Sponsor",
"Gold Sponsor",
View keybase.md

Keybase proof

I hereby claim:

  • I am younesmln on github.
  • I am supernova (https://keybase.io/supernova) on keybase.
  • I have a public key whose fingerprint is EF33 9284 B8D1 1473 199B C23F FC6A 4BED AA7A A4D9

To claim this, I am signing this object:

View test.jsx
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { graphql } from 'react-apollo';
import gql from 'graphql-tag';
class Profile extends Component { ... }
// We use the gql tag to parse our query string into a query document
const CurrentUserForLayout = gql`
query CurrentUserForLayout {
currentUser {
login
View webpack.common.config.js
const webpack = require('webpack');
const path = require('path');
const HTMLWebpackPlugin = require('html-webpack-plugin');
const Visualizer = require('webpack-visualizer-plugin');
const dependencies = require('../package.json').dependencies;
const __DEV__ = process.env.NODE_ENV === 'development';
const __PROD__ = process.env.NODE_ENV === 'production';
const __TEST__ = process.env.NODE_ENV === 'test';
View test.ex
defmodule Trello.AuthControllerTest do
use Trello.ConnCase
alias Trello.User
@valid_attrs %{email: "test@test.fr", f_name: "younes", l_name: "some content", password: "1234"}
setup %{conn: conn} do
{:ok, conn: put_req_header(conn, "accept", "application/json")}
end
View keybase.md

Keybase proof

I hereby claim:

  • I am supernova23 on github.
  • I am supernova (https://keybase.io/supernova) on keybase.
  • I have a public key whose fingerprint is EF33 9284 B8D1 1473 199B C23F FC6A 4BED AA7A A4D9

To claim this, I am signing this object:

View apiAccess.java
package com.pfe.projet.tracker.tasks;
import android.net.Uri;
import android.os.AsyncTask;
import android.util.Log;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;