Skip to content

Instantly share code, notes, and snippets.

const getTimeoutFor = function(timeoutSettings) {
return timeoutSettings.divider * timeoutSettings.times;
};
const timedCondition = function (client, done, context) {
const timeoutFor = getTimeoutFor(context.timeoutSettings);
setTimeout(function() {
context.condition(client).then(function(result) {
if (result.state !== 'success' && context.timeoutSettings.times > 0) {
context.timeoutSettings.times -= 1;
@rodrigomf24
rodrigomf24 / product-advisor-documentation.md
Last active February 8, 2018 15:06
product-advisor-documentation

Solution Diagram

Presentation Layer

sequenceDiagram
    participant B as Browser
    participant E as Ember App
@rodrigomf24
rodrigomf24 / level-1-component-documentation.md
Last active February 19, 2018 21:55
level-1-component-documentation

Siemens Portal Navigation Components (SPN)

Overview

The purpose of the components that compose the SPN is to provide the Siemens portal applications a unified navigation whose content can be generated dynamically based on the context selected by the end users.

The SPN consists of three components: Level-1, Level-2, and Level-3. (described bellow). Each component is in charge of providing the ember application its routing context.

# vim:ft=zsh ts=2 sw=2 sts=2
#
# agnoster's Theme - https://gist.github.com/3712874
# A Powerline-inspired theme for ZSH
#
# # README
#
# In order for this theme to render correctly, you will need a
# [Powerline-patched font](https://github.com/Lokaltog/powerline-fonts).
# Make sure you have a recent version: the code points that Powerline
@rodrigomf24
rodrigomf24 / jenikns_ci_on_ubuntu.md
Created February 16, 2017 01:25 — forked from ostinelli/jenkins_ci_on_ubuntu.md
Setup Jenkins CI on Ubuntu.

Jenkins CI

Instructions on how to setup a secured Jenkins CI.

Install Jenkins

$ wget -q -O - https://jenkins-ci.org/debian/jenkins-ci.org.key | sudo apt-key add -
$ sudo sh -c 'echo deb http://pkg.jenkins-ci.org/debian binary/ > /etc/apt/sources.list$ .d/jenkins.list'
$ sudo apt-get update
$ sudo apt-get install jenkins
@rodrigomf24
rodrigomf24 / create_svg
Last active February 20, 2016 18:57
create_svg
//http://codepen.io/anon/pen/dGEQWN
//http://codepen.io/anon/pen/rxEazy
function convertImageToCanvas(image){
var canvas = document.createElement('canvas');
canvas.width = image.width;
canvas.height = image.height;
canvas.getContext('2d').drawImage(image, 0,0);
return canvas;
}