Skip to content

Instantly share code, notes, and snippets.

View wobsoriano's full-sized avatar
🎯
Focusing

Robert Soriano wobsoriano

🎯
Focusing
View GitHub Profile
@wobsoriano
wobsoriano / adonisjs_eslint_prettier_airbnb.md
Last active April 22, 2024 10:25 — forked from bradtraversy/eslint_prettier_airbnb.md
AdonisJS ESLint, Prettier & Airbnb Setup

AdonisJs VSCode - ESLint, Prettier & Airbnb Setup

1. Install ESLint & Prettier extensions for VSCode

Optional - Set format on save and any global prettier options

2. Install Packages

npm i -D eslint prettier eslint-plugin-prettier eslint-config-prettier eslint-plugin-node eslint-plugin-html eslint-config-node
@wobsoriano
wobsoriano / sendmail.md
Last active August 17, 2019 13:18
Send email using Nodemailer with Axigen credentials

Send email using Nodemailer with Axigen credentials

1. Install nodemailer package

npm install nodemailer --save

2. Copy example

@wobsoriano
wobsoriano / Dockerfile
Last active August 18, 2019 02:27 — forked from amitavroy/Dockerfile
Docker setup with Laravel & MySQL
FROM php:7.2.10-apache-stretch
RUN apt-get update -yqq && \
apt-get install -y apt-utils zip unzip && \
apt-get install -y nano && \
apt-get install -y libzip-dev && \
a2enmod rewrite && \
docker-php-ext-install pdo pdo_mysql && \
docker-php-ext-configure zip --with-libzip && \
docker-php-ext-install zip && \
@wobsoriano
wobsoriano / .git-commit-template
Created September 17, 2019 07:15 — forked from zakkak/.git-commit-template
This commit message template that helps you write great commit messages and enforce it across your team.
# [<tag>] (If applied, this commit will...) <subject> (Max 72 char)
# |<---- Preferably using up to 50 chars --->|<------------------->|
# Example:
# [feat] Implement automated commit messages
# (Optional) Explain why this change is being made
# |<---- Try To Limit Each Line to a Maximum Of 72 Characters ---->|
# (Optional) Provide links or keys to any relevant tickets, articles or other resources
# Example: Github issue #23
/^[a-zA-Z0-9_.+-]+@(?:(?:[a-zA-Z0-9-]+.)?[a-zA-Z]+.)?(domain.com|domain.net)$/g
@wobsoriano
wobsoriano / index.jsx
Created February 13, 2020 02:59 — forked from avinmathew/index.jsx
Multiple layouts with React Router v4
import React from "react"
import { Route, Switch } from "react-router-dom"
const AppRoute = ({ component: Component, layout: Layout, ...rest }) => (
<Route {...rest} render={props => (
<Layout>
<Component {...props} />
</Layout>
)} />
)
@wobsoriano
wobsoriano / steps.txt
Created February 14, 2020 01:05
Eslint Prettier Create React App [2019]
Steps:
1. Install Eslint Globally
npm i -g eslint
2. Open your create-react-app react project or create one by typing
npx create-react-app name-of-project
(needs npm 5.2+)
3. Initiate Eslint in your project:
eslint --init
@wobsoriano
wobsoriano / App.js
Created February 16, 2020 02:33
Nativebase Footer Tabs with react-navigation 5 BottomTabNavigator
import React from 'react';
import {
Container,
Header,
Content,
Footer,
FooterTab,
Button,
Icon,
Text,
@wobsoriano
wobsoriano / README-Template.md
Created February 21, 2020 01:27 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@wobsoriano
wobsoriano / index.js
Created April 6, 2020 05:17
Download external image on button click
function downloadImage(data, filename = 'untitled.jpeg') {
var a = document.createElement('a');
a.href = data;
a.download = filename;
document.body.appendChild(a);
a.click();
}
document.getElementById('btn-download').addEventListener("click", function(e) {
const canvas = document.createElement('canvas');