Skip to content

Instantly share code, notes, and snippets.

View thedaviddias's full-sized avatar
🌍

David Dias thedaviddias

🌍
View GitHub Profile
@thedaviddias
thedaviddias / .zshrc
Created June 4, 2021 18:38 — forked from callumlocke/.zshrc
ZSH function to auto-switch to correct Node version
####
# ZSH function to auto-switch to correct Node version
# https://gist.github.com/callumlocke/30990e247e52ab6ac1aa98e5f0e5bbf5
#
# - Searches up your directory tree for the closest .nvmrc, just like `nvm use` does.
#
# - If you are already on the right Node version, IT DOES NOTHING, AND PRINTS NOTHING.
#
# - Works correctly if your .nvmrc file contains something relaxed/generic,
# like "4" or "v12.0" or "stable".

Cheat sheet: JavaScript Array methods

Deriving a new Array from an existing Array:

['■','●','▲'].slice(1, 3)           ['●','▲']
['■','●','■'].filter(x => x==='■')  ['■','■']
    ['▲','●'].map(x => x+x)         ['▲▲','●●']
    ['▲','●'].flatMap(x => [x,x])   ['▲','▲','●','●']
@thedaviddias
thedaviddias / tmux split-window subcommand.md
Created April 12, 2021 13:44 — forked from sdondley/tmux split-window subcommand.md
Super Guide to the split-window tmux Subcommand (and Beyond)

Super Guide to the split-window tmux Subcommand (and Beyond)

Guide overview

tmux, like other great software, is deceptive. On the one hand, it's fairly easy to get set up and start using right away. On the other hand, it's difficult to take advantage of tmux's adanced power features without spending some quality alone time with the manual. But the problem with manuals is that they aren't geared toward beginners. They are geared toward helping seasoned developers and computer enthusiasts quickly obtain the

@thedaviddias
thedaviddias / input.scss
Created March 10, 2021 05:09
Generated by SassMeister.com.
$anim: (
"1": 474,
"2": 433,
"3": 407,
"4": 458,
"5": 400,
"6": 427,
"7": 441,
"8": 419,
"9": 487,
@thedaviddias
thedaviddias / README.markdown
Created March 2, 2021 17:59 — forked from marijn/README.markdown
List of countries in YAML, CSV and TXT format
@thedaviddias
thedaviddias / dev.yml
Created January 19, 2021 17:04 — forked from maxkostinevich/dev.yml
Github Actions - Deploy Serverless Framework (AWS)
#
# Github Actions for Serverless Framework
#
# Create AWS_KEY and AWS_SECRET secrets in Github repository settings
# If you're using env.yml file, store its content as ENV Github secret
#
# Master branch will be deployed as DEV and every new tag starting with "v**" (e.g. v1.0, v1.2, v2.0, etc) will be deployed as PROD
#
# Learn more: https://maxkostinevich.com/blog/how-to-deploy-serverless-applications-using-github-actions/
#
@thedaviddias
thedaviddias / dev.yml
Created January 19, 2021 17:04 — forked from maxkostinevich/dev.yml
Github Actions - Deploy Serverless Framework (AWS)
#
# Github Actions for Serverless Framework
#
# Create AWS_KEY and AWS_SECRET secrets in Github repository settings
# If you're using env.yml file, store its content as ENV Github secret
#
# Master branch will be deployed as DEV and every new tag starting with "v**" (e.g. v1.0, v1.2, v2.0, etc) will be deployed as PROD
#
# Learn more: https://maxkostinevich.com/blog/how-to-deploy-serverless-applications-using-github-actions/
#
@thedaviddias
thedaviddias / reactathon2020.js
Created December 7, 2020 19:48 — forked from FermiDirak/reactathon2020.js
Learn static code analysis in React!
import jscodeshift from "jscodeshift";
import fs from "fs";
import path from "path";
const projectDirectory = "my/project/root/directory";
///////////////////////////////////////////////////////////////////////////////
// util functions
///////////////////////////////////////////////////////////////////////////////
@thedaviddias
thedaviddias / GitCommitEmoji.md
Created April 6, 2020 13:17 — forked from parmentf/GitCommitEmoji.md
Git Commit message Emoji