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 express = require('express'); | |
const portfinder = require('portfinder'); | |
const { render } = require('url-to-pdf-api/src/core/render-core.js'); | |
const { Storage } = require("@google-cloud/storage"); | |
const storage = new Storage({}); | |
const getImage = async (path, bucketName) => storage.bucket(bucketName).file(path).createReadStream(); | |
const streamImage = async (path, imageId, bucketName, res) => { | |
res.set('Content-Type', 'image/jpg'); |
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 readline = require('readline'); | |
const fs = require('fs'); | |
const uuid = require('uuid/v4'); | |
const rl = readline.createInterface({ | |
input: fs.createReadStream('./input.csv'), | |
output: fs.createWriteStream('./output.csv'), | |
}); | |
rl |
Spark is hype, Cassandra is cool and docker is awesome. Let's have some "fun" with all of this to be able to try machine learning without the pain to install C* and Spark on your computer.
NOTE: Before reading, you need to know this was my first attempt to create this kind of cluster, I created a github projet to setup a cluster more easily here
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
/* Exercise: Loops and Functions #43 */ | |
package main | |
import ( | |
"fmt" | |
"math" | |
) | |
func Sqrt(x float64) float64 { | |
z := float64(2.) |
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
{ | |
id: "4d49ca82", | |
model: { | |
href: "/foundation/v2/modelTypes/Product/models/140" | |
} | |
attribute: [ | |
{ | |
href: "/foundation/v2/attributes/title", | |
value: [ | |
"Find the rabbit" |
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/sh | |
################################################################################ | |
# Copyright 2010-2011 CloudBees Inc. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# |
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
# prerequisites to install on jenkins before each build | |
export DISPLAY=:1 | |
Xvfb :1 & | |
# | |
# Fetch node, grunt, bower, npm deps, ruby for compass... | |
# | |
#cd $1 |
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
package com.bla.web.controller; | |
import org.junit.Test; | |
import org.junit.runner.RunWith; | |
import org.mockito.Mock; | |
import org.mockito.Spy; | |
import org.mockito.runners.MockitoJUnitRunner; | |
import com.bla.web.dto.FamilyAndItems; | |
import com.bla.web.service.FamilyServiceImpl; |