$/
artifacts/
build/
docs/
lib/
packages/
samples/
src/
tests/
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
/* Basic example of saving cookie using axios in node.js and session's recreation after expiration. | |
* We have to getting/saving cookie manually because WithCredential axios param use XHR and doesn't work in node.js | |
* Also, this example supports parallel request and send only one create session request. | |
* */ | |
const BASE_URL = "https://google.com"; | |
// Init instance of axios which works with BASE_URL | |
const axiosInstance = axios.create({ baseURL: BASE_URL }); |
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
brew install gmp | |
brew install mpfr | |
brew install libmpc | |
pip install gmpy2 |
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 asset = require('assert'); | |
const fs = require('fs'); | |
const { promisify } = require('util'); | |
const stat = promisify(fs.stat); | |
describe('async stat', () => { | |
it('should not throw if file does exist', async () => { | |
try { | |
const stats = await stat(path.join('path', 'to', 'existingfile.txt')); | |
assert.notEqual(stats, null); |
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
curl -X "POST" "https://api.github.com/repos/rickcogley/REPONAME/issues?state=all" \ | |
-H "Cookie: logged_in=no" \ | |
-H "Authorization: token THEd13GITHUBfb87TOKENa4FROM5eSETTINGS" \ | |
-H "Content-Type: text/plain; charset=utf-8" \ | |
-d $'{ | |
"title": "A workflow alerts Operator who performs a process", | |
"body": "TBD", | |
"milestone": 5, | |
"assignees": [ | |
"RickCogley", |
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 arr1 = [1,2,3] | |
const arr2 = [4,5,6] | |
const arr3 = [...arr1, ...arr2] //arr3 ==> [1,2,3,4,5,6] |
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
=Navigating= | |
visit('/projects') | |
visit(post_comments_path(post)) | |
=Clicking links and buttons= | |
click_link('id-of-link') | |
click_link('Link Text') | |
click_button('Save') | |
click('Link Text') # Click either a link or a button | |
click('Button Value') |