Skip to content

Instantly share code, notes, and snippets.

View VinayaSathyanarayana's full-sized avatar

Vinaya Sathyanarayana VinayaSathyanarayana

View GitHub Profile
@VinayaSathyanarayana
VinayaSathyanarayana / Reserve - model.js
Created November 15, 2017 17:47
Reservation Flow - KeystoneJS help
var keystone = require('keystone');
var Types = keystone.Field.Types;
/**
* Hybrid from the model from the example contact and from SydJS example
*/
/**
* Reservation Model
* =============
@VinayaSathyanarayana
VinayaSathyanarayana / gulpfile.js
Created November 15, 2017 17:48 — forked from stevenkaspar/gulpfile.js
KeystoneJS SASS Development Gulpfile
/**
* 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');
@VinayaSathyanarayana
VinayaSathyanarayana / Example.js
Created November 29, 2017 06:27 — forked from flowck/Example.js
[Keystone.js] Use admin forms outside admin #671
// 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
sudo -i
apt-get update
apt-get install \
apache2-dev \
autoconf \
automake \
build-essential \
bzip2 \
#
# 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 =
@VinayaSathyanarayana
VinayaSathyanarayana / payment.html
Created August 3, 2018 17:37 — forked from travist/payment.html
Form.io + Stripe Payment Processing
<div ng-controller="StipePayment">
<formio form="form" submission="submission"></formio>
</div>
@VinayaSathyanarayana
VinayaSathyanarayana / .eslintrc.js
Created August 6, 2018 01:32 — forked from nkbt/.eslintrc.js
Strict ESLint config for React, ES6 (based on Airbnb Code style)
{
"env": {
"browser": true,
"node": true,
"es6": true
},
"plugins": ["react"],
"ecmaFeatures": {
@VinayaSathyanarayana
VinayaSathyanarayana / bandwidth.js
Created August 8, 2018 12:53 — forked from debloper/bandwidth.js
Determine client's connection speed with JavaScript
// 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
@VinayaSathyanarayana
VinayaSathyanarayana / stackPrinter.js
Created September 3, 2018 12:33 — forked from ErisDS/stackPrinter.js
Print an express middleware stack
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);
#-- 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