sudo apt-get update && sudo apt-get upgrade
sudo adduser --system --home=/opt/odoo --group odoo
sudo apt-get install postgresql sudo su - postgres createuser --createdb --username postgres --no-createrole --no-superuser --pwprompt odoo
/** | |
* Pluralization outputs singular or plural given a value | |
*/ | |
Handlebars.registerHelper('pluralize', function (value, singular, plural) { | |
return value > 1 ? plural : singular; | |
}); |
/** | |
* Replace \n by <br />, such as the `nl2br` in PHP | |
* @see http://stackoverflow.com/questions/2919337/jquery-convert-line-breaks-to-br-nl2br-equivalent | |
*/ | |
Handlebars.registerHelper('nl2br', function (text, isXhtml) { | |
var breakTag = (isXhtml || typeof isXhtml === 'undefined') ? '<br />' : '<br>'; | |
return (text + '').replace(/([^>\r\n]?)(\r\n|\n\r|\r|\n)/g, '$1' + breakTag + '$2'); | |
}); |
/** | |
* Moment - fromNow | |
*/ | |
Handlebars.registerHelper('moment_unix_fromNow', function (timestamp) { | |
return moment.unix(timestamp).fromNow(); | |
}); |
/** | |
* MomentJS - fromNow | |
*/ | |
Handlebars.registerHelper('moment_unix_fromNow', function (timestamp) { | |
return moment.unix(timestamp).fromNow(); | |
}); |
<textarea data-adaptheight rows="3" cols="40" placeholder="Your input" style="padding: 16px; line-height: 1.5;"></textarea> | |
<script> | |
(function() { | |
function adjustHeight(textareaElement, minHeight) { | |
// compute the height difference which is caused by border and outline | |
var outerHeight = parseInt(window.getComputedStyle(el).height, 10); | |
var diff = outerHeight - el.clientHeight; | |
// set the height to 0 in case of it has to be shrinked | |
el.style.height = 0; |
sudo apt-get update && sudo apt-get upgrade
sudo adduser --system --home=/opt/odoo --group odoo
sudo apt-get install postgresql sudo su - postgres createuser --createdb --username postgres --no-createrole --no-superuser --pwprompt odoo
Verifying that +sdethier is my blockchain ID. https://onename.com/sdethier |
#!/bin/bash | |
set -e | |
# -e: Exit immediately if a pipeline [...] returns a non-zero status. | |
# @see: https://www.gnu.org/software/bash/manual/bashref.html#The-Set-Builtin-1 | |
## prevent runing script outside the repo root | |
if ! [ -e scripts/release.sh ]; then | |
echo >&2 "Please run scripts/release.sh from the repo root" | |
exit 1 |
#/usr/bin/env bash | |
# MIT © Sindre Sorhus - sindresorhus.com | |
# git hook to run a command after `git pull` if a specified file was changed | |
# Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`. | |
changed_files="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)" | |
check_run() { | |
echo "$changed_files" | grep --quiet "$1" && eval "$2" |
// Express | |
const express = require('express'); | |
const bodyParser = require('body-parser'); | |
const path = require('path'); | |
const PORT = 9000; | |
const STATIC = path.resolve(__dirname, 'dist'); | |
const INDEX = path.resolve(STATIC, 'index.html'); |