Skip to content

Instantly share code, notes, and snippets.

View codessentials's full-sized avatar

Michiel Vermandel codessentials

View GitHub Profile
private storeMedia(systemNumber: string, picture: Media, imageData: string, uploadFileName: string, asThumb: boolean): Promise<any> {
const extension = uploadFileName.substring(uploadFileName.lastIndexOf('.') + 1, uploadFileName.length);
let fileName = picture.mediaType + '-' + (picture.creationDate || new Date()).getTime() + '.' + extension;
fileName = asThumb ? 'thumb-' + fileName : fileName;
const filePath = 'M' + systemNumber + '/' + fileName;
console.log('Saving media at', filePath, 'size', imageData.length);
const tmpParts = imageData.split('/');
const tmpFileName = tmpParts.pop();
const tmpFolder = tmpParts.join('/');
openapi: 3.0.0
info:
title: Sample
version: 1.0.0
paths:
/employees:
get:
operationId: getEmployees
responses:
'200':
@codessentials
codessentials / gist:4564424
Created January 18, 2013 13:01
how to copy all dependencies from a maven project in a folder
-Open a command shell and go to the root folder of the maven project.
-execute: mvn dependency:copy-dependencies -DoutputDirectory=[the output folder]