Skip to content

Instantly share code, notes, and snippets.

View madiodio's full-sized avatar
💭
⚡️

Madiodio Gaye madiodio

💭
⚡️
  • Paris, France
View GitHub Profile
let A = [
{ _id: "34231555", status: "CANCELED", motif: "unable" },
{ _id: "1234551", status: "FAILLED", motif: "no number" },
,
{ _id: "1234455", status: "CANCELED", motif: "injoignable" },
];
let B = ["34231555", "1234455"];
stage_name_constructor: >
if [ $SEED_STAGE_BRANCH == 'api-prod-client-version' ]; then
echo 'prod'
else
echo $SEED_STAGE_NAME
fi
@madiodio
madiodio / getDelayFromNetworkSpeed.ts
Created April 25, 2020 18:26 — forked from timc1/getDelayFromNetworkSpeed.ts
Control the speed at which your loading state shows up depending on the user's internet speed.
const defaultDelay = 500;
export default function getDelay(): number {
if (typeof window !== "undefined") {
if (window.navigator && window.navigator.connection) {
const connection = window.navigator.connection.effectiveType;
switch (connection) {
case "4g":
return defaultDelay;
case "3g":
:root {
--force-covid19-primary-color: #379956,
--force-covid19-secondary-color: #EF255F,
--force-covid19-tertiary-color: #FFC85B,
--primary-green: #379956,
--primary-red: #EF255F,
--primary-yellow: #FFC85B,
}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
const apiUrl = "http://api.paps.sn/api/v1/"
const apiKey = "7090e4f41fd0dd4750b1bab1b0fa563e222aee17272"
const methodName = "createTasksWithClientApp"
const params = {
email: "example@paps-app.com",
deliveries: [
{
export default [
{
name: "Point relais",
text: "Deposer et retirer vos colis en toute sécurité"
},
{
name: "API",
text: "Automatiser toute votre chaine logistique ou juste vos courses en intégrant notre API. Chez Paps, nous savons que votre temps est précieux."
},
{
const apiUrl = "http://api.paps.sn/api/v1/"
const apiKey = "7090e4f41fd0dd4750b1bab1b0fa563e222aee17272"
const methodName = "getQuotes"
const params = {
origin: "Les Almadies, Dakar, Senegal", // Représente l'origine de la course. Doit être une adresse géocode valide
destionation: "Medina, Dakar, Senegal", // Représente la destination de la course. Doit être une adresse géocode valide
packageSize: "small" // Représente le poids du colis à transporter. Doit être entre les valeurs "small" (S correspond à max 5kg), "medium" (M à max 30 kg), "large" (L à max 60 kg) ou "xLarge" (XL à max 100kg). Visitez la documentation pour bien distinguer pour en savoir plus.
@madiodio
madiodio / paps-api-updateTask-ruby-example.rb
Last active April 23, 2019 18:44
Exempe de code pour mettre à jour une tâche sur Paps API
require 'uri'
require 'net/http'
url = URI("https://api.paps.sn/api/v1/updateTaskStatus?apiKey=wthqt63urj8ifq1qhizrtujtn0eyvli3fvmuxjgih5rke7nqag2f&test=true")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Post.new(url)
{
"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"