Skip to content

Instantly share code, notes, and snippets.

View thedaviddias's full-sized avatar
🌍

David Dias thedaviddias

🌍
View GitHub Profile
@thedaviddias
thedaviddias / dev.yml
Created January 19, 2021 17:04 — forked from maxkostinevich/dev.yml
Github Actions - Deploy Serverless Framework (AWS)
#
# Github Actions for Serverless Framework
#
# Create AWS_KEY and AWS_SECRET secrets in Github repository settings
# If you're using env.yml file, store its content as ENV Github secret
#
# Master branch will be deployed as DEV and every new tag starting with "v**" (e.g. v1.0, v1.2, v2.0, etc) will be deployed as PROD
#
# Learn more: https://maxkostinevich.com/blog/how-to-deploy-serverless-applications-using-github-actions/
#
@thedaviddias
thedaviddias / dev.yml
Created January 19, 2021 17:04 — forked from maxkostinevich/dev.yml
Github Actions - Deploy Serverless Framework (AWS)
#
# Github Actions for Serverless Framework
#
# Create AWS_KEY and AWS_SECRET secrets in Github repository settings
# If you're using env.yml file, store its content as ENV Github secret
#
# Master branch will be deployed as DEV and every new tag starting with "v**" (e.g. v1.0, v1.2, v2.0, etc) will be deployed as PROD
#
# Learn more: https://maxkostinevich.com/blog/how-to-deploy-serverless-applications-using-github-actions/
#
@thedaviddias
thedaviddias / repo-reset.md
Created July 20, 2018 15:38 — forked from heiswayi/repo-reset.md
GitHub - Delete commits history with git commands

First Method

Deleting the .git folder may cause problems in our git repository. If we want to delete all of our commits history, but keep the code in its current state, try this:

# Check out to a temporary branch:
git checkout --orphan TEMP_BRANCH

# Add all the files:
git add -A
@thedaviddias
thedaviddias / reactathon2020.js
Created December 7, 2020 19:48 — forked from FermiDirak/reactathon2020.js
Learn static code analysis in React!
import jscodeshift from "jscodeshift";
import fs from "fs";
import path from "path";
const projectDirectory = "my/project/root/directory";
///////////////////////////////////////////////////////////////////////////////
// util functions
///////////////////////////////////////////////////////////////////////////////
@thedaviddias
thedaviddias / .babelrc
Created February 13, 2017 12:24 — forked from dengjonathan/.babelrc
Webpack/ Babel/ Express Env for React
{
"plugins": ["react-hot-loader/babel"],
"ignore":[]
}
@thedaviddias
thedaviddias / GitCommitEmoji.md
Created April 6, 2020 13:17 — forked from parmentf/GitCommitEmoji.md
Git Commit message Emoji

Storybook Docs w/ CRA & TypeScript

This is a quick-and-dirty walkthrough to set up a fresh project with Storybook Docs, Create React App, and TypeScript. If you're looking for a tutorial, please see Design Systems for Developers, which goes into much more depth but does not use Typescript.

The purpose of this walkthrough is a streamlined Typescript / Docs setup that works out of the box, since there are countless permutations and variables which can influence docs features, such as source code display, docgen, and props tables.

Step 1: Initialize CRA w/ TS

npx create-react-app cra-ts --typescript
@thedaviddias
thedaviddias / index.html
Created September 19, 2019 15:25
00-header.html
<!DOCTYPE html>
<html>
<head>
</head>
<body>
</body>
</html>
@thedaviddias
thedaviddias / placeholder.css
Created December 3, 2012 13:38 — forked from kaelig/placeholder.css
Applies placeholder attribute behavior in web browsers that don't support it
input {
color: #444;
background: white;
}
input.placeholder {
color: #aaa;
}