//import
var h = require('handlebars');
//Handlebars sources
var code = `
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
//@cr A File URL is posted to the CHAT in the Resolution Field and the server render the content to the browser with the file content | |
var fetch = require('isomorphic-fetch'); // or another library of choice. | |
var fs = require('fs'); | |
var Dropbox = require('dropbox').Dropbox; | |
var token = process.env.DROPBOX_TOKEN; | |
var dbx = new Dropbox({ accessToken: token, fetch: fetch }); | |
var annoter_file = "9c6a35efe357580f32e759908430643d.annoter.txt"; | |
var annoter_folder_path = '/x/_/_db/annoter'; | |
var annoter_file_path = annoter_folder_path + '/' + annoter_file; |
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
//import | |
var h = require('handlebars'); | |
//@stcgoal That we can use Markdown into Templates data that will be rendered as HTML | |
h.registerHelper('markdown', require('helper-markdown')); | |
//------------------------------------------- | |
//@STCGoal Use Markdown in your Code to Render it as HTML |
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
//import | |
var h = require('handlebars'); | |
//Register an Helper for the Handlebars rendering | |
h.registerHelper('list',function(items,options) | |
{ | |
var out = ` | |
<table> | |
<tr><td>Name</td><td>Note</td></tr>`; | |
items.forEach(element => { |
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
//Install require an env var with your API keys | |
//export GOOGLE_APPLICATION_CREDENTIALS="/home/jgi/x/etc/mykeys-5oeu3uoeu.json" | |
// Imports the Google Cloud client library | |
const {Translate} = require('@google-cloud/translate'); | |
// Instantiates a client | |
const translate = new Translate({ | |
}); |
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
{ | |
"name": "transapp", | |
"version": "0.0.1", | |
"description": "Master the Translate API to create. string Hello world is adde to each lang located in the i18n directory using the translator", | |
"main": "index.js", | |
"scripts": { | |
"test": "echo \"Error: no test specified\" && exit 1" | |
}, | |
"keywords": [], | |
"author": "Guillaume Isabelle", |
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
"assets": [ | |
"src/favicon.ico", | |
{ | |
"glob": "*.svg", | |
"input": "./node_modules/country-icons/Markup/blocks/lng/i/", | |
"output": "assets/i18n.icon/" | |
}, | |
"src/assets", | |
"src/assets/i18n" | |
], |
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
/** | |
* Creates a JSON Token from a UID for connecting to Firebase. | |
*/ | |
const config = require('./config'); | |
// The Firebase Admin SDK to access the Firebase Realtime Database. | |
const admin = require('firebase-admin'); | |
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/bash | |
NOBLANK=" | |
@xset s noblank | |
@xset s off | |
@xset -dpms | |
" | |
# Pretty ANSI text colors | |
OFF="\033[0m" |
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/bash | |
NOBLANK=" | |
@xset s noblank | |
@xset s off | |
@xset -dpms | |
" | |
# Pretty ANSI text colors | |
OFF="\033[0m" |