Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View mezod's full-sized avatar

Joan Boixadós mezod

View GitHub Profile
{
// ----------------------------------------------------------------------
// Debug Mode
// ----------------------------------------------------------------------
//
// @param {bool} "debug"
// @default false
//
// When enabled (true), additional debugging information about the command
// and configured settings will be printed to the Sublime Text Console;
{
"parser": "babel-eslint",
"parserOptions": {
"ecmaFeatures": {
"jsx": true,
"ecmaVersion": 8,
"experimentalObjectRestSpread": true
}
},
"rules": {
{
"Location": "https://cloudfront.amazonaws.com/2017-10-30/distribution/distro_id/invalidation/invalidation_id",
"Invalidation": {
"Id": "invalidation_id",
"Status": "InProgress",
"CreateTime": "2018-07-14T23:33:51.427Z",
"InvalidationBatch": {
"Paths": {
"Quantity": 2,
"Items": [
* get(params, user_id) {
const query = knex
.select(['habits.*',
'dates.created_at as dates_created_at', 'dates.date', 'dates.skip'])
.where({ user_id })
.orderBy('position', 'ASC')
.from('habits');
if (params.stats) {
query.leftJoin('dates', 'habits.id', '=', 'dates.habit_id');
Mar 15 23:48:22 ns399575.ip-5-196-67.eu systemd[1]: Stopped Caddy HTTP/2 web server.
-- Subject: Unit caddy.service has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit caddy.service has finished shutting down.
Mar 15 23:48:22 ns399575.ip-5-196-67.eu systemd[1]: caddy.service: Start request repeated too quickly.
Mar 15 23:48:22 ns399575.ip-5-196-67.eu systemd[1]: Failed to start Caddy HTTP/2 web server.
-- Subject: Unit caddy.service has failed
-- Defined-By: systemd
eventradr.com {
proxy / localhost:8080
## log /var/log/caddy/eventradr-com-caddy-access.log
## errors /var/log/caddy/eventradr-com-caddy-errors.log
tls mezood@gmail.com
}
eventradr.com:3000 {
proxy / localhost:3000
## log /var/log/caddy/api-eventradr-com-caddy-access.log
var http = require('http'),
httpProxy = require('http-proxy');
var proxy = httpProxy.createProxyServer({});
var server = http.createServer(function(req, res) {
var host = req.headers.host;
var url;
console.log(host);
knex('events').select()
.where(knex.raw('events.user_id = users.id'))
.sum('upvotes')
.as('numupvotes')
.count()
.as('numevents')