Skip to content

Instantly share code, notes, and snippets.

View carlosrojaso's full-sized avatar
🎯
Focusing

Carlos Rojas carlosrojaso

🎯
Focusing
View GitHub Profile
{
test: /\.json$/,
loader: 'json-loader'
},
{
test: /\.css$/,
loader: 'raw-loader'
},
{
test: /\.html$/,
@carlosrojaso
carlosrojaso / gist:c1f4d8b96d57110386f345896434b51d
Created August 24, 2019 17:16 — forked from danielestevez/gist:2044589
GIT Commit to an existing Tag
1) Create a branch with the tag
git branch {tagname}-branch {tagname}
git checkout {tagname}-branch
2) Include the fix manually if it's just a change ....
git add .
git ci -m "Fix included"
or cherry-pick the commit, whatever is easier
git cherry-pick {num_commit}
@carlosrojaso
carlosrojaso / gist:c760a1a97a2f62f0c6b054cf8a0dee87
Created September 7, 2019 10:56
Release node_modules space
find . -name "node_modules" -type d -prune | xargs du -chs
find . -name "node_modules" -type d -prune -exec rm -rf '{}' +
$ git remote add upstream https://github.com/ORIGINAL_OWNER/ORIGINAL_REPOSITORY.git
$ git merge upstream/develop
$ git push origin develop
this.tasks = this.tasks.filter((el) => el.id !== deletedTask.id);
For componentDidMount
useEffect(() => {
// Your code here
}, []);
For componentDidUpdate
useEffect(() => {
// Your code here
}, [yourDependency]);
@carlosrojaso
carlosrojaso / AppSync-Example.yaml
Created January 16, 2020 18:04 — forked from adrianhall/AppSync-Example.yaml
An example CloudFormation template for AWS AppSync
---
Description: AWSAppSync DynamoDB Example
Resources:
GraphQLApi:
Type: "AWS::AppSync::GraphQLApi"
Properties:
Name: AWSAppSync DynamoDB Example
AuthenticationType: AWS_IAM
PostDynamoDBTableDataSource:
@carlosrojaso
carlosrojaso / index.html
Last active September 29, 2020 12:18
Step 1
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Demo - error-component</title>
</head>
<body>
<script>
</script>
@carlosrojaso
carlosrojaso / index.html
Last active September 29, 2020 12:17
Step 2
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Demo - error-component</title>
</head>
<body>
<script>
class ErrorComponent extends HTMLElement {
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Demo - error-component</title>
</head>
<body>
<error-component>Default Message</error-component>
<error-component kind="warning">Warning Message</error-component>