Skip to content

Instantly share code, notes, and snippets.

View guidouil's full-sized avatar
🍌
Floating

Guillaume Darbonne guidouil

🍌
Floating
View GitHub Profile
@guidouil
guidouil / fuiColors.js
Last active November 22, 2020 09:24
Semantic UI / Fomantic UI colors list function
const colors = () => {
return [
{
name: 'black',
css: 'black',
code: '#1B1C1D',
},
{
name: 'red',
css: 'red',
@guidouil
guidouil / activities.js
Last active February 7, 2019 13:41
ActivitiesSchema
export const ActivitiesSchema = new SimpleSchema({
_id: {
type: String,
optional: true, // because insert
},
reference: {
type: String,
},
name: {
type: String,
module.exports = {
servers: {
one: {
// TODO: set host address, username, and authentication method
host: '51.68.45.76',
username: '',
// pem: './path/to/pem'
password: ''
// or neither for authenticate from ssh-agent
}
// Server side route to read data-form comming from mailgun
// /imports/startup/server/routes.js
import { Meteor } from 'meteor/meteor';
import { WebApp } from 'meteor/webapp';
import formidable from 'formidable';
import ical from 'ical';
import fs from 'fs';
const newSurveyFromMail = Meteor.bindEnvironment((senderMail, event) => {
Meteor.call('newSurveyFromMail', senderMail, event);
return Surveys.aggregate(
{ $match: query },
{ $group: {
_id: dateGroup,
participants: { $sum: '$ratersCount' },
rating: { $avg: '$averageRating' },
surveys: { $push: '$_id' },
selectedTags: { $push: '$tags' },
peoples: { $addToSet: '$fullname' },
} },
import Tabular from 'meteor/aldeed:tabular';
import { Template } from 'meteor/templating';
import moment from 'moment';
import { Meteor } from 'meteor/meteor';
import Employees from '/imports/api/employees/employees.js';
TabularTables.customerEmployees = new Tabular.Table({
name: 'customerEmployees',
collection: 'Meteor.users',
pub: 'customerEmployees',
'use strict';
import React, {Component} from 'react';
import { AppRegistry, StyleSheet, Text, View, Button } from 'react-native'
import {
PageContainer,
Schedule,
Result,
Sports,
News,

Deploy a Meteor app on a dedicated linux server

Requirement

You need, Meteor, MongoDB and Node.js installed on the machine.

And it also requires the forever npm package to be globaly installed.

Deploy script to copy/past in shell ⚠️ NOT AS ROOT

Be sure to replace the CAPITALIZED words with you own and to adapt the meteor npm install ... to your dependencies from your package.json file

@guidouil
guidouil / Meteor Template generator blaze
Last active February 22, 2017 11:27
Meteor Template Generator
[{[templateName]}]
---------------------------------------------------------
[{[templateName]}]_style.css
---------------------------------------------------------
[{[templateName]}]_template.html
<template name='[{[templateName]}]'>
</template>
---------------------------------------------------------
[{[templateName]}]_script.js
{
"links": {},
"module": {
"id": "5617ca151e98db5a838b4637",
"links": {},
"name": "introduction",
"available_template_types": [
{
"links": {},
"name": "ff1"