Hello Le Wagon 👋
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Alot of these configs have been taken from the various places | |
# on the web, most from here | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# Set the colours you can use | |
black='\033[0;30m' | |
white='\033[0;37m' | |
red='\033[0;31m' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const createDonationMachine = Machine({ | |
id: "createDonation", | |
initial: "inactive", | |
states: { | |
inactive: { on: { TOGGLE: "not_normalize" } }, | |
not_normalize: { on: { TOGGLE: "send_slack_notification" } }, | |
send_slack_notification: { on: { TOGGLE: "send_email_notification" } }, | |
send_email_notification: { on: { TOGGLE: "send_to_identity" } }, | |
send_to_identity: { on: { TOGGLE: "updatePetition" } }, | |
updatePetition: { on: { TOGGLE: "active" } }, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { | |
ApolloServer, | |
} = require('apollo-server-express') | |
const express = require('express') | |
const app = express() | |
const {typeDefs} = require('./schema/TypeDefs') | |
const { PubSub } = require('apollo-server') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require('dotenv').config() | |
const mongoose = require('mongoose') | |
mongoose.connect(process.env.DATABASE, { | |
useNewUrlParser: true | |
}) | |
mongoose.Promise = global.Promise // Tell Mongoose to use ES6 promises | |
mongoose.connection.on('error', (err) => { | |
//@eslint-ignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env zx | |
// await $`npm install --global @squoosh/cli` | |
// await $`npm install --global slug` | |
// await $`npm install --global escape-path-with-spaces` | |
import slug from 'slug' | |
import escape from 'escape-path-with-spaces' | |