Skip to content

Instantly share code, notes, and snippets.

View albertosouza's full-sized avatar
👨‍🔬
Creating things

Alberto Souza albertosouza

👨‍🔬
Creating things
View GitHub Profile
@letanure
letanure / estados-cidades.json
Last active April 30, 2024 23:07
JSON estados cidades do brasil, dividido por estados. segunda lista atualizada em 2020, dados do IBGE
{
"estados": [
{
"sigla": "AC",
"nome": "Acre",
"cidades": [
"Acrelândia",
"Assis Brasil",
"Brasiléia",
"Bujari",
@kevinSuttle
kevinSuttle / meta-tags.md
Last active March 31, 2024 14:26 — forked from lancejpollard/meta-tags.md
List of Usable HTML Meta and Link Tags
@crtr0
crtr0 / client.js
Created June 8, 2012 17:02
A simple example of setting-up dynamic "rooms" for socket.io clients to join
// set-up a connection between the client and the server
var socket = io.connect();
// let's assume that the client page, once rendered, knows what room it wants to join
var room = "abc123";
socket.on('connect', function() {
// Connected, let's sign-up for to receive messages for this room
socket.emit('room', room);
});
export default class File {
/**
* Returns the appropriate file extension of the file according to the type
*/
extension: string;
/**
* A unique id generated for this file
*/
id: string;
@jnrbsn
jnrbsn / GPL.md
Last active April 29, 2023 14:59
A Markdown-formatted GPL for your GitHub projects.

GNU GENERAL PUBLIC LICENSE

Version 3, 29 June 2007

Copyright © 2007 Free Software Foundation, Inc. <http://fsf.org/>

Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.

@cjzopen
cjzopen / Organization json-ld
Last active March 29, 2023 17:03
Organization json-ld example
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@graph": [{
"@type": "Organization",
"@id": "https://www.example.com/#organization",
"name": "{{ your name }}",
"url": "https://www.example.com/",
"address": "{{ address }}",
"email": "{{ email }}",
/**
* Script simples para importação de dados de cotação da Bovespa
*
* Requisitos:
* - Node.js instalado
* - instalar as dependencias: npm install extract-zip moment request
*
* Exemplo de uso: node script_simples_importaca_cota_hist_bovespa.js 05022019
*
* Post relacionado: https://albertosouza.net/artigos/22-importando-dados-bovespa

A Modest Proposal: Events

Sails.js v0.10

Events are a new feature of the Sails core as of 0.9.

Core events

Lifecycle

@circa10a
circa10a / easy-soap-request-index.js
Last active May 24, 2021 23:02
easy-soap-request-index.js
const axios = require('axios-https-proxy-fix');
/**
* @author Caleb Lemoine
* @param {object} opts easy-soap-request options
* @param {string} opts.url endpoint URL
* @param {object} opts.headers HTTP headers, can be string or object
* @param {string} opts.xml SOAP envelope, can be read from file or passed as string
* @param {int} opts.timeout Milliseconds before timing out request
* @param {object} opts.proxy Object with proxy configuration
@mikermcneil
mikermcneil / plugins_proposal.md
Last active October 19, 2020 08:42
Sails.js v0.9 plugins proposal

A Modest Proposal: Hooks

Sails.js v0.9: Release Cantidate for 1.0

Philosophy

  • The question of what "belongs" in a framework is complex, and depends on your use case. A better question is "what are the defaults?" By pulling all of the current features of Sails into plugins, and then including them by default, we provide full customizability (the possibility of disabling just about everything) without sacrificing all the conveniences Sails developers are used to.
  • Plugins make it easier to contribute, and make modifying the core a much less scary proposition.
  • Node.js is quite minimalist, and super awesome. Let's take a leaf out of Ryan/Isaac's book!
  • Community plugins are fantastic, but to ensure quality, plugins will only be listed on the Sails website/repo when they've met some basic quality assurance testing.