Skip to content

Instantly share code, notes, and snippets.

View Alexisvt's full-sized avatar
🎯
Focusing

Alexis Villegas Torres Alexisvt

🎯
Focusing
  • San Jose, Costa Rica
View GitHub Profile
@Alexisvt
Alexisvt / Search my gists.md
Created January 23, 2020 11:52 — forked from santisbon/Search my gists.md
How to search gists

Enter this in the search box along with your search terms:

Get all gists from the user santisbon.
user:santisbon

Find all gists with a .yml extension.
extension:yml

Find all gists with HTML files.
language:html

@Alexisvt
Alexisvt / README.md
Last active March 23, 2020 03:43
Dart intl package cheatsheet

The intl package supports a broad range of date formatting patterns. Here's a list (taken from the official docs):

DAY                          d
 ABBR_WEEKDAY                 E
 WEEKDAY                      EEEE
 ABBR_STANDALONE_MONTH        LLL
 STANDALONE_MONTH             LLLL
 NUM_MONTH                    M
 NUM_MONTH_DAY                Md
@Alexisvt
Alexisvt / jsconfig.json
Created April 10, 2020 02:45
JSConfig file for Node.js projects
{
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"checkJs": true,
"resolveJsonModule": true,
"esModuleInterop": true,
},
"exclude": ["node_modules"]
}
@Alexisvt
Alexisvt / mongo.md
Created April 12, 2020 23:12
Mongo DB container setup command

How to run a mongo db container

docker run -it --rm --network backend_default mongo mongo --host mongo -u root -p root --authenticationDatabase admin graphqlserver
@Alexisvt
Alexisvt / moment-sample.js
Last active July 15, 2020 16:13
Code snippet showing how to transform a regular date to UTC and vice versa.
const moment = require('moment');
const regularDate = moment() // ?
const regularDateString = regularDate.format('YYYY-mm-DD HH:ss'); // ?
const utcDate = moment.utc() // ?
const utcString = utcDate.format('YYYY-mm-DD HH:ss') //?
// transforming regular to UTC
console.log(moment.utc(regularDate).format('YYYY-mm-DD HH:ss')) // ?
@Alexisvt
Alexisvt / go-commands.md
Last active August 17, 2020 01:29
Some useful go commands

List of useful go commands

go help

Display useful information about the different commands available. If we need more information about an specific command, type:

# Where [command] can be any of the available commands
go help [command]
@Alexisvt
Alexisvt / proto3.md
Created September 4, 2020 17:47 — forked from figassis/proto3.md
Protocol Buffer CheatSheet

Proto3 Cheat Sheet

Information From: https://developers.google.com/protocol-buffers/docs/proto3

A few rules

  • Declaring Message In Protocol Buffer:

  • As you can see, each field in the message definition has a unique number.

  • Field numbers identify fields in message binary format. Should not be changed once message is in use

@Alexisvt
Alexisvt / mpv.conf
Last active January 2, 2021 17:45
My mpv.conf file settings
keep-open=yes
reset-on-next-file=pause
geometry=50%x50%
pause
@Alexisvt
Alexisvt / npm-commands.md
Last active February 24, 2022 23:52
Common npm commands

Notes about npm and Yarn v1

How to install packages globally

For yarn use this command

yarn global add <package_name>

For npm use this instead

@Alexisvt
Alexisvt / README.md
Last active September 10, 2021 00:24
Little guide about how to setup a Vite VueJS project with TypeScript, TailwindCSS, ESLint and Prettier support.

Little guide about how to setup a Vite VueJS project with TypeScript, TailwindCSS, ESLint and Prettier support.

Initialize the project

Run this command

yarn create vite <my-awesome-project> --template vue-ts

This will create a VueJS project with TypeScript support, but it doesn't add the configuration for Prettier or Eslint, let's add that.