Skip to content

Instantly share code, notes, and snippets.

View macrozone's full-sized avatar

Marco Wettstein macrozone

View GitHub Profile
@macrozone
macrozone / FileField.jsx
Last active May 31, 2017 22:57
File-filed with uniforms and ostrio:files in meteor
import React from 'react';
import { connectField } from 'uniforms';
import Dropzone from 'react-dropzone';
import withMeteorUploader from '../../hocs/with_meteor_uploader';
import CollectionImage from '/client/modules/core/containers/collection_image';
export const ImageFile = ({
disabled,
id,
label,
/**
DRAFT for a i18n_service for meteor-mantra-apps, it uses https://github.com/vazco/meteor-universe-i18n/
Made to be used in configs/context.js in mantra:
const supportedLocales = [ 'de', 'en', 'fr', 'it' ];
const defaultLocale = 'de';
const i18n = I18nService(
{universeI18n, SimpleSchema, FlowRouter},
{supportedLocales, defaultLocale}
fizzbuzz = function(number) {
if (number % 15 === 0) {
return 'FizzBuzz';
}
if (number % 3 === 0) {
return 'Fizz';
}
if (number % 5 === 0) {
return 'Buzz';