Skip to content

Instantly share code, notes, and snippets.

View madiodio's full-sized avatar
💭
⚡️

Madiodio Gaye madiodio

💭
⚡️
  • Paris, France
View GitHub Profile
@madiodio
madiodio / import_json_appsscript.js
Created February 24, 2017 01:33 — forked from chrislkeller/import_json_appsscript.js
Adds what amounts to an =ImportJSON() function to a Google spreadsheet... To use go to Tools --> Script Editor and add the script and save.
/**
* Retrieves all the rows in the active spreadsheet that contain data and logs the
* values for each row.
* For more information on using the Spreadsheet API, see
* https://developers.google.com/apps-script/service_spreadsheet
*/
function readRows() {
var sheet = SpreadsheetApp.getActiveSheet();
var rows = sheet.getDataRange();
var numRows = rows.getNumRows();
@madiodio
madiodio / destructuring.js
Created March 23, 2017 01:31 — forked from mikaelbr/destructuring.js
Several demos and usages for ES6 destructuring. Runnable demos and slides about the same topic: http://git.mikaelb.net/presentations/bartjs/destructuring
// === Arrays
var [a, b] = [1, 2];
console.log(a, b);
//=> 1 2
// Use from functions, only select from pattern
var foo = () => [1, 2, 3];
import hoistStatics from 'hoist-non-react-statics';
import React from 'react';
/**
* Allows two animation frames to complete to allow other components to update
* and re-render before mounting and rendering an expensive `WrappedComponent`.
*/
export default function deferComponentRender(WrappedComponent) {
class DeferredRenderWrapper extends React.Component {
constructor(props, context) {
@madiodio
madiodio / formikApollo.js
Created November 7, 2017 02:50 — forked from mwickett/formikApollo.js
Formik + Apollo
import React from 'react'
import { withRouter, Link } from 'react-router-dom'
import { graphql, compose } from 'react-apollo'
import { Formik } from 'formik'
import Yup from 'yup'
import FormWideError from '../elements/form/FormWideError'
import TextInput from '../elements/form/TextInput'
import Button from '../elements/form/Button'
import { H2 } from '../elements/text/Headings'
.system-font-stack {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", Helvetica, Arial, sans-serif;
}
{
"method": "POST",
"url": "https://api.paps.sn/v1/createPickup",
"httpVersion": "HTTP/1.1",
"queryString": [
{
"name": "apiKey",
"value": "69bd76dc74ca1d0834de769e3947481a25a9389fc2e172ab1c33"
}
],
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Add Omi in One Minute</title>
</head>
<body>
<div><like-button /></div>
import Express from "express";
import { createMerchant } from "paths";
const app = Express();
app.post("/createMerchant", createMerchant);
<?php
// Guzzle est supposé déjà être chargé avec le vendor/autoload.php
// Initialiser le Client avec GuzzleHttp
$client = new GuzzleHttp\Client();
// Pour avoir les informations sur une tâche donnée dont l' ID de la tâche est 22792852
$client->request('GET', 'https://api.paps.sn/v1/viewTask', [
'query' => ['apiKey' => '69bd76dc74ca1d0834de769e3947481a25a9389fc2e172ab1c33', 'id' => '22792852']
]);
{
"typescript.tsserver.log": "verbose",
// "window.title": "${dirty} ${activeEditorMedium}${separator}${rootName}",
"window.title": "${activeEditorMedium}${separator}${rootName} ⚡",
"terminal.integrated.fontSize": 14,
"terminal.integrated.fontFamily": "Hasklig",
"editor.tokenColorCustomizations": {
"[fairyfloss]": {
"types": {
"foreground": "#ffb0fe"