Skip to content

Instantly share code, notes, and snippets.

View pixelomo's full-sized avatar
🏠
Working from home

Pixelomo pixelomo

🏠
Working from home
View GitHub Profile
EN
const cryptoWS = new WebSocket(`wss://mZ3Zq4NXbp.finage.ws:6002/?token=${process.env.FINAGE_SOCKET_KEY}`);
const indicesWS = new WebSocket(`wss://8umh1cipe9.finage.ws:9001/?token=${process.env.FINAGE_SOCKET_KEY}`);
cryptoWS.onopen = () => {
cryptoWS.send(JSON.stringify({"action": "subscribe", "symbols": "BTCUSD,ETHUSD,IOTAUSD,ADAUSD,XRPUSD,DOTUSD,DOGEUSD"}))
}
cryptoWS.onmessage = (msg) => {
let data = JSON.parse(msg.data);
console.log(data)
}
Scenario: Filtering results using the date filter in more facets dropdown # collections/newspaper.feature:3✔ Given I am on the Newspapers collection page # support/step-definitions.js:23✖ When I click the more filters dropdown button # support/step-definitions.js:79Timed out while waiting for element <[data-qa="more filters dropdown button"]> to be present for 5000 milliseconds. - expected "visible" but got: "not found" (5520ms)at Object.clickOnTheTarget (/app/support/step-runners.js:95:18)at World.<anonymous> (/app/support/step-definitions.js:80:5)
And I enter "18-05-1982" in the date range start input # support/step-definitions.js:70
And I enter "18-05-2004" in the date range end input # support/step-definitions.js:70
And I click the apply button # support/step-definitions.js:79
Then I should be on /en/collections/topic/18-newspapers?page=1&qf=proxy_dcterms_issued%3A%5B1982-05-18%20TO%202004-05-18%5D&view=grid&api=fulltext # support/step-definitions.js:104✔ After # config/cucumber.conf.js:56
@pixelomo
pixelomo / ScrollToTop.html
Last active March 8, 2017 10:43
Creating a simple scroll to top button. At the bottom of the document you'll see a button with the id of top. Below this I've included a link to jQuery followed by a simple script. First there's a function that is checking what the current window screoll position is, you can see this being logged in the console. When this reaches position 250 it…
<html>
<head>
<style type="text/css">
body{
text-align: center;
font-family: sans-serif;
}
h1{
font-size: 45px;
}
// Create Vertical Carousel
var vertical = new carousel({
    box         : 'vert-box',
    slider      : 'vert-carousel',
    vertical    : true,
    vertWidth   : "100%",
    vertHeight  : 800
});
// Create Autoplay Carousel
var auto = new carousel({
    box       : 'auto-box',
    slider    : 'auto-carousel',
    autoplay  : true,
    autoDelay : 3
});
// Create Carousel
var fcategories = new carousel({
    box       : 'carouselbox',
    slider    : 'fcategories',
    controls  : 'catscontrols'
});