This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ========================================================================== | |
Design Tokens as foundational CSS Variables | |
Using "Clamp" for Text sizes inspired by fluid scale typography concepts | |
MIT © Santiago Greco - fsgreco@hey.com | |
- gist.github.com/fsgreco/f4a55ae8eea9ad11bd7588a2eeb24630 | |
You can use this along with "reset.css": `npm i gist:0822bebdf9935e1c5cfd5e3d1018a565` | |
Vscode Extension suggested: `ext install cr34t1ve.csvars` | |
========================================================================== */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
shownm='find . -name "node_modules" -type d -prune | xargs du -chs' | |
delnm='find . -name "node_modules" -type d -prune -exec rm -rf '\''{}'\'' +' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "reset.css", | |
"version": "1.0.7", | |
"description": "A modern CSS file that resets and normalizes the default styles of HTML elements.", | |
"main": "reset.css", | |
"author": "Santiago Greco <fsgreco@fastmail.com> (https://github.com/fsgreco)", | |
"license": "MIT", | |
"type": "module", | |
"keywords": [ | |
"css", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require('packer').startup(function(use) | |
-- Package manager | |
use 'wbthomason/packer.nvim' | |
-- ... | |
-- Writing related plugins | |
use 'reedes/vim-pencil' | |
use "folke/twilight.nvim" | |
use 'folke/zen-mode.nvim' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function findBreakoutElem(rootElem = document.body) { | |
function checkElemWidth(elem) { | |
if (elem.clientWidth > window.outerWidth) { | |
console.log("The following element has a larger width than the window's outer width"); | |
console.log(elem); | |
console.log('<-------------------------------------------------------------------->'); | |
} else if (elem.scrollWidth > window.outerWidth) { | |
console.log("The following element has a larger width than the window's scroll width"); | |
console.log(elem); | |
console.log('<-------------------------------------------------------------------->'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# MIT © Santiago Greco - fsgreco@hey.com | |
# Set new folder to hooks | |
# In order to get this script working automatically (it triggers when user runs `npm install`): | |
# 1. place this script inside .githooks folder | |
# 2. set a script "prepare" on package.json with the command: .githooks/set-hooks.sh | |
HASHOOKPATH="$(git config core.hooksPath)" | |
if [[ -z "$HASHOOKPATH" ]]; then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# MIT © Santiago Greco - fsgreco@hey.com | |
# | |
# What it does: | |
# If the site is already in production, instead of manually download all the files in upload folder | |
# your local apache server will search and use the production files if they are not found on localhost | |
# | |
# How to use it: | |
# Place this file inside your own localhost environment: `your_localhost/wp-content/uploads/.htaccess` | |
# Change "YOUR_DOMAIN.TLD" with your actual production domain name inside the RewriteRule line. | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# MIT © Santiago Greco - fsgreco@hey.com | |
# This file set two bash functions that interact with github gist public API. It is made for single file gists. | |
# The first one "gist_list" retrieves a list of public gist from a given username (the only param you need to pass). | |
# The second one "download_gist" downloads the single gist file (need to have 2 params: username and gits_name) | |
function check_jq() { | |
if ! command -v jq &> /dev/null; then echo "Please install 'jq'." && exit 1; fi | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# MIT © Santiago Greco - fsgreco@hey.com | |
# This script fetches a list of active plugins from your production wordpress environment. | |
# Once it retrieves the list it creates a second script ready to run: `install-plugins.sh` | |
# | |
# For more context and information please consult the documentation of the entire project: | |
# docker-wordpress - https://github.com/fsgreco/docker-wordpress#sync-plugins | |
if ! command -v jq &> /dev/null; then echo "Please install 'jq'." && exit 1; fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
/** | |
* MIT © Santiago Greco - fsgreco@hey.com | |
* This script fetches a list of active plugins from your production wordpress environment. | |
* The goal is to quickly install the same plugins on local environment (matching their version numbers). | |
* How it works: | |
* Once it retrieves the list it creates a second script (in bash) ready to run: `install-plugins.sh` | |
* The script generated consist on a set of instructions to install everything using wp-cli. | |
* This second script can be modified or adapted. |
NewerOlder