- websiteDomain: http://example.com:3000
- apiDomain: http://example.com:3001
- cookieDomain: "example.com"
Cookie Domain in the DevTools:
import * as crypto from 'node:crypto'; | |
interface WeightedVariation { | |
variationIndex: number; | |
weight: number; | |
} | |
interface Context { | |
key: string; | |
[attribute: string]: any; |
const fetch = require('isomorphic-fetch'); | |
const PERSONAL_ACCESS_TOKEN = ''; | |
const repos = [ | |
"yc-frontend", | |
"yc-gateway", | |
"yc-biz-logic", | |
"yc-database", |
const fs = require('fs'); | |
const { exec } = require("child_process"); | |
function getDirectories(path) { | |
return fs.readdirSync(path).filter(function (file) { | |
return fs.statSync(path+'/'+file).isDirectory(); | |
}); | |
} |
{ | |
"scripts": { | |
"lint:fs:js": "eslint --fix --ext .js ./frontend-service/components ./frontend-service/hocs ./frontend-service/lib ./frontend-service/pages ./frontend-service/reusable-components ./frontend-service/utils", | |
"lint:gql": "eslint ./gql-service/src ./gql-service/scripts ./gql-service/index.js", | |
"lint:api": "eslint ./api-service/src ./api-service/scripts ./api-service/index.js", | |
"lint:db": "eslint ./db-service/src ./db-service/scripts ./db-service/index.js" | |
}, | |
"devDependencies": { | |
"babel-eslint": "^10.1.0", | |
"eslint": "^6.8.0", |
{ | |
"extends": [ | |
"airbnb", | |
"plugin:prettier/recommended" | |
], | |
"parser": "babel-eslint", | |
"settings": { | |
"react": { | |
"version": "16.3" | |
} |
import math as m | |
# Utils | |
def findHAngle(dx, dy): | |
"""Determines the angle with respect to the x axis of a segment | |
of coordinates dx and dy | |
""" | |
l = m.sqrt(dx*dx + dy*dy) | |
if dy > 0: | |
return m.acos(dx/l) |
/* Helper buddy for removing async/await try/catch litter 🗑 */ | |
function O_o(promise) { | |
return promise.then(data => { | |
if (data instanceof Error) return [data] | |
return [null, data] | |
}).catch(err => [err]) | |
} | |
/* Look ma, no try/catch */ | |
async function usageExample(params) { |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge" /> | |
<link | |
rel="stylesheet" | |
href="https://unpkg.com/leaflet@1.4.0/dist/leaflet.css" | |
integrity="sha512-puBpdR0798OZvTTbP4A8Ix/l+A4dHDD0DGqYW6RQ+9jxkRFclaxxQb/SJAWZfWAkuyeQUytO7+7N4QKrDh+drA==" |
$ ssh brad@192.168.1.29
$ mkdir test
$ cd test