Skip to content

Instantly share code, notes, and snippets.

View juanpicado's full-sized avatar
🎯
Focusing

Juan Picado juanpicado

🎯
Focusing
View GitHub Profile
@juanpicado
juanpicado / index.js
Created February 16, 2020 12:13
Verdaccio and Node API
const fs = require('fs');
const path = require('path');
const verdaccio = require('verdaccio').default;
const YAML = require('js-yaml');
const getConfig = () => {
return YAML.safeLoad(fs.readFileSync(path.join(__dirname, 'config.yaml'), 'utf8'));
}
const cache = path.join(__dirname, 'cache');
@juanpicado
juanpicado / config.yaml
Last active March 11, 2019 19:05
Fetch a package with Verdaccio and Gemfury as Uplink (Bearer Token)
storage: ./storage
plugins: ./plugins
web:
title: Verdaccio
auth:
htpasswd:
file: ./htpasswd
uplinks:
npmjs:
url: https://registry.npmjs.org/
@juanpicado
juanpicado / node-event-loop-demo.js
Created February 2, 2018 12:02 — forked from ghaiklor/node-event-loop-demo.js
This example shows how you can block event loop in NodeJS
'use strict';
// The purpose of this example is to show
// how you can block the event loop with JavaScript.
// There is 3 routes
// / respond with Hello, World text
// /block uses JavaScript while for 5 seconds
// /non-block uses setTimeout for 5 seconds
// Do the following
$> npm install wd
// execute the test
$> node wd.foo.test.js
$> chromedriver --url-base=wd/hub --verbose
Starting ChromeDriver (v2.9.248315) on port 9515
$> adb start-server
$> adb devices
List of devices attached
12n45n54b device
$ git clone https://github.com/juanpicado/javascript-unit-testing-samples
$ npm install
var wd = require('wd');
require('colors');
var chai = require("chai");
var chaiAsPromised = require("chai-as-promised");
chai.use(chaiAsPromised);
chai.should();
var browser = wd.remote('localhost', 9515);
browser.init({
browserName: "chrome",
chromeOptions: {
module.exports = function(config) {
config.set({
basePath: './',
autoWatch: true,
frameworks: ['mocha'],
files: [
'../src/js/*.js',
'./test/*.js'
],
browsers: ['PhantomJS', 'Chrome', 'Firefox'],
WAR File
/atlassian-jira-5.0-rc3-source/jira-project/jira-distribution/jira-webapp-dist/target/jira-webapp-dist-5.0-rc3.war