var links = $('a');
$(links).each(function(i, link){
console.log($(link).attr('href));
});
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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'); | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="application/ld+json"> | |
{ | |
"@context" : "http://schema.org", | |
"@type" : "Organization", | |
"name" : "example", | |
"logo": "https://example.com.tw/logo.png", | |
"url" : "https://example.com.tw/", | |
"address" : "address", | |
"email" : "[email protected]", | |
"founder" : "you can use People type here", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var gm = require('gm'); | |
var canvasWidth = 248; | |
var canvasHeight = 389; | |
gm(__dirname + '/original.jpg').size(function(error, size) { | |
if (error) { | |
console.error(error); |
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
- APP cliente: https://github.com/wejs/we-client-emberjs-messenger
- Server / projeto de teste para a API: https://github.com/wejs/site
- Plugin para adicionar a API no projeto de servidor: https://github.com/wejs/we-plugin-messenger
1- Clonar e instalar o projeto do site do We.js https://github.com/wejs/site
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#node | |
sudo apt-get install curl | |
curl -sL https://deb.nodesource.com/setup_0.12 | sudo bash - | |
sudo apt-get install nodejs | |
#mysql | |
sudo apt-get install mysql-server mysql-client |
NewerOlder