Skip to content

Instantly share code, notes, and snippets.

View zeekrey's full-sized avatar
🙋‍♂️
I would love to give a talk about nextjs. Let me know if I can help.

Christian zeekrey

🙋‍♂️
I would love to give a talk about nextjs. Let me know if I can help.
View GitHub Profile
@zeekrey
zeekrey / bucket-policy.json
Created March 30, 2019 21:31
Make a AWS S3 Bucket public (static website hosting)
{
"Version": "2012-10-17",
"Statement": [{
"Sid": "PublicReadGetObject",
"Effect": "Allow",
"Principal": "*",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::domain.com/*"
}]
}
@zeekrey
zeekrey / buildspec.yml
Created March 30, 2019 22:12
AWS CodeBuild buildspec for Vue.js
version: 0.2
phases:
install:
commands:
- npm install -g yarn
pre_build:
commands:
- yarn install
build:
@zeekrey
zeekrey / index.js
Created May 6, 2019 14:31
Read and transform big file line by line with Node.js
var fs = require('fs'), es = require('event-stream')
// Define your input and output files
var inputFile = 'Path:/to/file'
var outputFile = 'Path:/to/file'
var lineNr = 0
var writeStream = fs.createWriteStream(outputFile)
var readStream = fs.createReadStream(inputFile)
@zeekrey
zeekrey / index.js
Created May 16, 2019 15:04
React Redux Boilerplate
/**
* Folder structure
*/
src
-- redux
-- -- action
-- -- -- builder.js
-- -- -- counter.js
-- -- reducer
@zeekrey
zeekrey / FunctionComponent.tsx
Created November 29, 2019 20:11
[Typescript Functional Component Template] This is just my template for a new functional component written in React and Typescript. #react #typescript #functional-component
import React, { useState, useEffect, FunctionComponent } from "react"
import PropTypes from "prop-types"
type SubscribeProps = {
title: string
paragraph?: string
}
const Subscribe: FunctionComponent<SubscribeProps> = ({
title,
@zeekrey
zeekrey / Subscribe.tsx
Last active December 7, 2019 13:58
[Typescript Functional Component Template with emotion and tailwind] This is just my template for a new functional component written in React and Typescript using emotion and tailwind. #react #typescript #functional-component #emotion #tailwind
/** @jsx jsx */
import { css, jsx } from "@emotion/core"
import styled from "@emotion/styled"
import React, { useState, useEffect, FunctionComponent } from "react"
import PropTypes from "prop-types"
import tw from "tailwind.macro"
type SubscribeProps = {
title: string
paragraph?: string
@zeekrey
zeekrey / firebase-cypress.js
Created July 6, 2020 12:45
Just a simple Firebase cleanup script to delete a given user by eMail address before a cypress test runs.
// signup.spec.js
/// <reference types="cypress" />
const path = require('path')
describe('Testing the user system', () => {
let user
beforeEach(() => {
@zeekrey
zeekrey / killportinuse.ps
Created September 17, 2020 08:21
If port is already in use...
Powershell:
netstat -ano | findstr "PID :3000"
taskkill /PID 20300 /F
@zeekrey
zeekrey / nextjsLoadFont.md
Last active January 7, 2021 11:32
Load fonts in a Next.js
  1. Convert font file to woff2.
  2. Create a folder called 'fonts' within the public folder.
  3. Past all needed fonts there.
  4. Create a font.css file within this folder and use the follwing code:
@font-face {
  font-family: "Museo Sans";
  font-style: normal;
 font-weight: 500;
{
"$schema": "https://raw.githubusercontent.com/jsonresume/resume-schema/v1.0.0/schema.json",
"basics": {
"name": "Christian Krey",
"label": "Frontend dev and teach lead",
"image": "",
"email": "[email protected]",
"url": "https://krey.io/",
"summary": "I know how to create scaling IT system architectures, and entrepreneurship and web development are both passions of mine. I strive to grow and learn every day, and long-term, I want to apply my IT and entrepreneurship knowledge to make the world a better place.",
"location": {