Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View magdairis's full-sized avatar

Magda Iris magdairis

View GitHub Profile
@magdairis
magdairis / keybase.md
Created April 17, 2019 06:59
Public Keybase

Keybase proof

I hereby claim:

  • I am magdairis on github.
  • I am magdairis (https://keybase.io/magdairis) on keybase.
  • I have a public key ASDYEr-uuCOVLQTvpxEErOoti-E7sEOgrEPo6Vsiw7-hcQo

To claim this, I am signing this object:

const itemsJson = require('./items.json');
const FS = require('fs');
const PATH = require('path')
const SVGO = require('svgo');
const svgo = new SVGO();
let out = itemsJson.map((itemJson) => {
let imagePath = itemJson["imagePath"]
@magdairis
magdairis / header.md
Last active June 7, 2020 10:32
header

Questions

Set the scene

  • What's the difference between a header and a nav?
  • Why do I need a header?
  • Should I use the same header for mobile and desktop?
  • What should I include in the header?
  • What makes a good header?
  • How is a header/nav different in React/Gatsby?
import React, { useState } from "react";
import styles from "./Header.module.css";
import { motion } from "framer-motion";
import theme from "tailwindcss/defaultTheme";
import MenuToggle from "./MenuToggle";
import SvgIcon from "./SvgIcon";
import { Link } from "gatsby";
const Header = () => {
// const [variant, setVariant] = useState("closed")
@magdairis
magdairis / 01-database.md
Created September 21, 2020 10:08
01-database

Create Cloud SQL DB instance

gcloud sql instances create commerce-sql-00 --database-version=POSTGRES_12 --tier db-f1-micro --region europe-west2

Set Postgres superuser password

gcloud sql users set-password postgres --instance=commerce-sql-00 --prompt-for-password

Get instance connection name

gcloud sql instances describe commerce-sql-00 --format="value(connectionName)"

Start the Cloud SQL proxy

@magdairis
magdairis / cloud-src-commands.md
Created September 21, 2020 10:08
cloud-src-commands

Create repo on Cloud Source

gcloud source repos create $REPO_NAME

Setup git authentication with Cloud Source

git config --global credential.'https://source.developers.google.com'.helper gcloud.sh

Add remote

git remote add origin $(gcloud source repos describe $REPO_NAME --format="value(url)"

@magdairis
magdairis / SHOP-backend-documentation.md
Created September 21, 2020 10:08
SHOP-backend-documentation

Setting up DB to be pushed and deployed easy peasy

Log in to Google Cloud console

  • Bearjam commerce project
  • Database instance can have multiple databases
    • so we don't have to pay for multiple users

Set up Cloud SQL proxy PostgreSQL

  • Quickstart for local testing