This file contains hidden or 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
var keystone = require('keystone'); | |
var Types = keystone.Field.Types; | |
/** | |
* Hybrid from the model from the example contact and from SydJS example | |
*/ | |
/** | |
* Reservation Model | |
* ============= |
This file contains hidden or 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
/** | |
* gulp file that will restart keystonejs app and compile sass | |
*/ | |
'use strict'; | |
var gulp = require('gulp'); | |
var watch = require('gulp-watch'); | |
var shell = require('gulp-shell') | |
var sass = require('gulp-sass'); |
This file contains hidden or 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
// Model | |
var keystone = require('keystone'), | |
Types = keystone.Field.Types; | |
// Set new model | |
var Example = new keystone.List('Example', { | |
nocreate: true | |
}); | |
// Set the fields of your model |
This file contains hidden or 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
sudo -i | |
apt-get update | |
apt-get install \ | |
apache2-dev \ | |
autoconf \ | |
automake \ | |
build-essential \ | |
bzip2 \ |
This file contains hidden or 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
# | |
# Auth filter /etc/fail2ban/filter.d/nginx-auth.conf: | |
# | |
# Blocks IPs that makes too much accesses to the server | |
# | |
[Definition] | |
failregex = ^<HOST> -.*"(GET|POST).*HTTP.*" | |
ignoreregex = |
This file contains hidden or 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
<div ng-controller="StipePayment"> | |
<formio form="form" submission="submission"></formio> | |
</div> |
This file contains hidden or 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
{ | |
"env": { | |
"browser": true, | |
"node": true, | |
"es6": true | |
}, | |
"plugins": ["react"], | |
"ecmaFeatures": { |
This file contains hidden or 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
// Let's initialize the primitives | |
var startTime, endTime, fileSize; | |
// Set up the AJAX to perform | |
var xhr = new XMLHttpRequest(); | |
// Rig the call-back... THE important part | |
xhr.onreadystatechange = function () { | |
// we only need to know when the request has completed |
This file contains hidden or 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
module.exports = function stackPrinter(req, res, next) { | |
console.log('Printing Stack For', req.url); | |
function printItem(item, prefix) { | |
prefix = prefix || ''; | |
if (item.route) { | |
console.log(prefix, 'Route', item.route.path); | |
} else if (item.name === '<anonymous>') { | |
console.log(prefix, item.name, item.handle); |
This file contains hidden or 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
#-- encoding: UTF-8 | |
#-- copyright | |
# OpenProject is a project management system. | |
# Copyright (C) 2012-2017 the OpenProject Foundation (OPF) | |
# | |
# This program is free software; you can redistribute it and/or | |
# modify it under the terms of the GNU General Public License version 3. | |
# | |
# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: | |
# Copyright (C) 2006-2017 Jean-Philippe Lang |