Skip to content

Instantly share code, notes, and snippets.

View paulclindo's full-sized avatar
🚀
Never stop learning!

Paul Ccari paulclindo

🚀
Never stop learning!
View GitHub Profile
@paulclindo
paulclindo / slugify.js
Last active December 5, 2022 22:46 — forked from codeguy/slugify.js
Create slug from string in Javascript
const slugify = (text) => {
return text
.toString() // Cast to string (optional)
.normalize('NFKD') // The normalize() using NFKD method returns the Unicode Normalization Form of a given string.
.toLowerCase() // Convert the string to lowercase letters
.trim() // Remove whitespace from both sides of a string (optional)
.replace(/\s+/g, '-') // Replace spaces with -
.replace(/[^\w\-]+/g, '') // Remove all non-word chars
.replace(/\_/g,'-') // Replace _ with -
.replace(/\-\-+/g, '-') // Replace multiple - with single -
@paulclindo
paulclindo / table.html
Created April 12, 2022 04:56
Semantic HTML Table
<!--
source: https://developer.mozilla.org/en-US/docs/Learn/HTML/Tables/Advanced#adding_a_caption_to_your_table_with_caption
-->
<table>
<!-- a11y: the caption is meant to contain a description of the table contents -->
<caption>
Item Cart
</caption>
<!-- You can use thead, tbody, tfoot for better styling. No a11y impact -->
@paulclindo
paulclindo / remove-all-from-docker.sh
Created December 2, 2020 18:55 — forked from beeman/remove-all-from-docker.sh
Remove all from Docker
# Stop all containers
docker stop `docker ps -qa`
# Remove all containers
docker rm `docker ps -qa`
# Remove all images
docker rmi -f `docker images -qa `
# Remove all volumes
@paulclindo
paulclindo / vscode.json
Created April 21, 2020 07:01
VSCode Settings
{
"workbench.colorTheme": "SynthWave '84",
"workbench.iconTheme": "material-icon-theme",
"atomKeymap.promptV3Features": true,
"editor.multiCursorModifier": "ctrlCmd",
"editor.formatOnPaste": true,
"editor.formatOnSave": true,
"editor.fontFamily": "Fira Code, Consolas, 'Courier New', monospace",
"editor.fontSize": 14,
"editor.fontWeight": "300",
{
"workbench.colorTheme": "SynthWave '84",
"workbench.iconTheme": "material-icon-theme",
"atomKeymap.promptV3Features": true,
"editor.multiCursorModifier": "ctrlCmd",
"editor.formatOnPaste": true,
"editor.formatOnSave": true,
"editor.fontFamily": "Fira Code, Consolas, 'Courier New', monospace",
"editor.fontSize": 14,
"editor.fontWeight": "300",
@paulclindo
paulclindo / package.json
Created September 16, 2019 03:56
Webpack plugins & loaders
{
"name": "PlatziVideo",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build": "webpack --mode production",
"start": "webpack-dev-server --open --mode development"
},
@paulclindo
paulclindo / webpack.config.js
Created September 16, 2019 03:54
Webpack 4 for React, Sass
const path = require("path");
const HtmlWebpackPlugin = require("html-webpack-plugin");
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
module.exports = {
entry: "./src/index.js",
output: {
path: path.resolve(__dirname, "dist"),
filename: "bundle.js"
},
@paulclindo
paulclindo / eslintrc
Created September 15, 2019 19:34 — forked from gndx/eslintrc
{
"env": {
"browser": true,
"es6": true,
"node": true
},
"extends": ["airbnb"],
"globals": {
"document": false,
"escape": false,
@paulclindo
paulclindo / gitignore
Created September 15, 2019 19:34 — forked from gndx/gitignore
# Node template
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Runtime data
@paulclindo
paulclindo / micromodal.css
Created May 7, 2019 15:52 — forked from ghosh/micromodal.css
Demo modal styles for micromodal.js and corresponding expected html. If using this, set the `awaitCloseAnimation` in config to true
/**************************\
Basic Modal Styles
\**************************/
.modal {
font-family: -apple-system,BlinkMacSystemFont,avenir next,avenir,helvetica neue,helvetica,ubuntu,roboto,noto,segoe ui,arial,sans-serif;
}
.modal__overlay {
position: fixed;