Skip to content

Instantly share code, notes, and snippets.

View plinionaves's full-sized avatar

Plínio Naves plinionaves

View GitHub Profile
@plinionaves
plinionaves / rollup.config.js
Created April 14, 2021 01:24
rollup + rollup-plugin-vue + scss + postcss
/* eslint-disable @typescript-eslint/no-var-requires */
import { terser } from 'rollup-plugin-terser'
import alias from '@rollup/plugin-alias'
import babel from '@rollup/plugin-babel'
import commonjs from '@rollup/plugin-commonjs'
import minimist from 'minimist'
import postcss from 'rollup-plugin-postcss'
import replace from '@rollup/plugin-replace'
import resolve from '@rollup/plugin-node-resolve'
import typescript from 'rollup-plugin-typescript2'
@plinionaves
plinionaves / .babelrc
Created March 30, 2021 01:16 — forked from thejmazz/.babelrc
async/await with webpack+babel
{
"presets": ["es2015"],
"plugins": ["transform-async-to-generator"]
}
@plinionaves
plinionaves / Makefile
Created February 3, 2021 17:44 — forked from scastiel/Makefile
Resources for eBook creating using Pandoc
all: pdf epub kindle html examples
BOOK_TITLE = A\ React\ Developer’s\ Guide\ to\ Hooks\ -\ Sebastien\ Castiel
dist:
@mkdir -p dist
pdf: dist/${BOOK_TITLE}.pdf
@echo '✅ PDF'
@plinionaves
plinionaves / service-worker.js
Created September 22, 2020 14:41 — forked from jeffposnick/service-worker.js
Example of InjectManifest in Workbox v5
// Add any other logic here as needed.
import { CacheableResponsePlugin } from 'workbox-cacheable-response/CacheableResponsePlugin';
import { CacheFirst } from 'workbox-strategies/CacheFirst';
import { createHandlerForURL } from 'workbox-precaching/createHandlerForURL';
import { ExpirationPlugin } from 'workbox-expiration/ExpirationPlugin';
import { NavigationRoute } from 'workbox-routing/NavigationRoute';
import { precacheAndRoute } from 'workbox-precaching/precacheAndRoute';
import { registerRoute } from 'workbox-routing/registerRoute';
@plinionaves
plinionaves / rAF.js
Created August 28, 2020 03:34 — forked from paulirish/rAF.js
requestAnimationFrame polyfill
// http://paulirish.com/2011/requestanimationframe-for-smart-animating/
// http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating
// requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel
// MIT license
(function() {
var lastTime = 0;
var vendors = ['ms', 'moz', 'webkit', 'o'];
@plinionaves
plinionaves / Instructions.md
Created June 23, 2020 18:11 — forked from pgilad/Instructions.md
Generate SSL Certificate for use with Webpack Dev Server (OSX)

Generate private key

$ openssl genrsa -out private.key 4096

Generate a Certificate Signing Request

openssl req -new -sha256 \
@plinionaves
plinionaves / single-upload.md
Created March 6, 2020 03:40
Snippets para Upload com GraphQL | Curso GraphQL APIs com Node, MongoDB, Mongoose, Redis, GraphQL Yoga

GraphQL Upload (single)

  • operations
{  
  "query": "mutation SingleUpload($data: UploadCreateInput!) { singleUpload(data: $data) { filename } }",
  "variables": {
    "data": {
      "file": null
 }

GraphQL Upload

operations

{
  "query": "mutation SingleUpload($data: UploadInput!) { singleUpload(data: $data) { _id filename url mimetype } }",
  "variables":{
    "data": { 
      "file": null
 } 
@plinionaves
plinionaves / vscode-chrome-debug.md
Last active November 19, 2020 01:55
VSCode + Chrome Debug in attached mode

VSCode + Chrome Debug

launch mode

  1. VSCode launch.json
{
  "version": "0.2.0",
  "configurations": [
@plinionaves
plinionaves / vue-folder-structure.md
Last active May 17, 2024 09:53
Vue Project Folder Structure

Style Guide

This file describes de required Style Guide used by Basicamente to keep the Best Practices on develop new features or improve/change existents one.

Project folder structure

Always follow the folder structure below:

src/