Skip to content

Instantly share code, notes, and snippets.

View abnersajr's full-sized avatar

Abner Soares Alves Junior abnersajr

View GitHub Profile
@sindresorhus
sindresorhus / esm-package.md
Last active May 30, 2025 12:32
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.
Ruby e Rails
Guias:
http://guides.rubyonrails.org/
Livros (Free mas vale pagar um café para o autor ;) ):
https://leanpub.com/conhecendo-ruby
Livros (Pagos):
https://leanpub.com/conhecendo-rails
@swalkinshaw
swalkinshaw / tutorial.md
Last active February 26, 2025 21:15
Designing a GraphQL API

Folder Structure

Please note

While this gist has been shared and followed for years, I regret not giving more background. It was originally a gist for the engineering org I was in, not a "general suggestion" for any React app.

Typically I avoid folders altogether. Heck, I even avoid new files. If I can build an app with one 2000 line file I will. New files and folders are a pain.

@abnersajr
abnersajr / sitionet.validate
Last active August 29, 2015 14:01
Validade Object with functions used to validate values on Sitionet Agency
var Validate = {
email: function( valor ) {
regex = new RegExp( /^([a-z0-9_\.\+-]+)@([\da-z\.-]+)\.([a-z\.]{2,6})$/ );
return regex.test( valor );
},
string: function ( valor ) {
return (typeof valor === "string");
},
float: function( valor ) {
valor = replaceAll( ',', '.', valor );
@kevinSuttle
kevinSuttle / meta-tags.md
Last active May 30, 2025 13:08 — forked from lancejpollard/meta-tags.md
List of Usable HTML Meta and Link Tags