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
/** | |
* 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
// 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
module.exports = { | |
adapter:'exampleDB', | |
//tableName:'locale', | |
attributes: { | |
text: { | |
type: 'string' | |
}, | |
// locale config |
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" : "example@.com.tw", | |
"founder" : "you can use People type here", |
Please help build that feature with ideas 💭 here ... or code and tests here: https://github.com/wejs/sails-acl
- User model - TODO add example link
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
# Cakefile | |
{exec} = require "child_process" | |
option '', '--grep [string]', 'only run tests matching <pattern>' | |
REPORTER = "spec" | |
task "test", "run all tests", (options)-> | |
grep |
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 | |
# Script to run app.js with supervision and ignore folders | |
supervisor -i .tmp/,.git/,node_modules/,views/,assets/images/,assets/linker/templates,assets/templates,assets/js/angularjs,assets/angularjs/main.js app.js | |
#supervisor -i .tmp/,.git/,node_modules/,views/ -- --debug=5555 app.js |
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); |
NewerOlder