Skip to content

Instantly share code, notes, and snippets.

Working at Linky!

Alberto Souza albertosouza

Working at Linky!
View GitHub Profile
albertosouza / check-if-file-exists.js
Created Jan 19, 2020
Simple script to show how to check if file exists with Node.js
View check-if-file-exists.js
// text.txt file is in same folder where we are running this script
let filePath = path.join(process.cwd(), 'text.txt');
// Check if file exists and have access with fs.access:
fs.access(filePath, fs.F_OK, function (err) {
if (err) {
console.log('file not exists or not have access');
} else {
console.log('file exists');
View 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
albertosouza /
Created Oct 28, 2019
Exemplos de como pegar o href de links com cherrio
View script_simples_importaca_cota_hist_bovespa.js
* 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:
albertosouza / Organization json-ld
Created Dec 5, 2017 — forked from cjzopen/Organization json-ld
Organization json-ld example
View Organization json-ld
<script type="application/ld+json">
"@context" : "",
"@type" : "Organization",
"name" : "example",
"logo": "",
"url" : "",
"address" : "address",
"email" : "",
"founder" : "you can use People type here",
albertosouza / graphics_magick_center_image_on_canvas.js
Created Oct 31, 2015 — forked from edwardhotchkiss/graphics_magick_center_image_on_canvas.js
Use GM Module (Graphics Magick) for Node.js to center an image on a white background canvas
View graphics_magick_center_image_on_canvas.js
var gm = require('gm');
var canvasWidth = 248;
var canvasHeight = 389;
gm(__dirname + '/original.jpg').size(function(error, size) {
if (error) {
albertosouza /
Created Oct 29, 2015 — forked from kevinSuttle/
List of Usable HTML Meta and Link Tags

Copied from

Basic HTML Meta Tags

<meta charset='UTF-8'>
<meta name='keywords' content='your, tags'>
<meta name='description' content='150 words'>
<meta name='subject' content='your website's subject'>
<meta name='copyright' content='company name'>

O we messenger hoje possuí uma estrutura distribuída distribuída com um app de cliente ember.js e a API (server) com we.js e o plugin we-plugin-messenger

Repositórios relacionados:

Como montar a estrutura de serviços?

1- Clonar e instalar o projeto do site do We.js

albertosouza /
Created Oct 19, 2015 — forked from jnrbsn/
A Markdown-formatted GPL for your GitHub projects.


Version 3, 29 June 2007

Copyright © 2007 Free Software Foundation, Inc. <>

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

albertosouza /
Last active Sep 29, 2015
How to install we.js v0.3.x in Ubuntu
sudo apt-get install curl
curl -sL | sudo bash -
sudo apt-get install nodejs
sudo apt-get install mysql-server mysql-client