Skip to content

Instantly share code, notes, and snippets.

View bludnic's full-sized avatar
💭
(⌐■_■)

bludnic

💭
(⌐■_■)
  • Lisbon
View GitHub Profile
@bludnic
bludnic / auth.test.js
Created April 19, 2018 17:41 — forked from dimensi/auth.test.js
Test from microblog on koa.js
import test from 'ava'
import supertest from 'supertest'
process.env.MONGODB_APPLICATION_USER = 'admin'
process.env.MONGODB_APPLICATION_DATABASE = 'admin'
process.env.MONGODB_APPLICATION_PASS = 'qweqwe'
process.env.MONGODB_HOST = 'localhost'
const server = require('../index')
let listen = null
let db = null
@bludnic
bludnic / .eslintrc.json
Created February 15, 2018 13:00 — forked from leny/.eslintrc.json
ESLint config file for node.js + ES6 projects.
{
"env": {
"node": true,
"es6": true
},
"ecmaFeatures": {
"arrowFunctions": true,
"blockBindings": true,
"classes": true,
"defaultParameters": true,
@bludnic
bludnic / node-folder-structure-options.md
Created December 31, 2017 05:53 — forked from lancejpollard/node-folder-structure-options.md
What is your folder-structure preference for a large-scale Node.js project?

What is your folder-structure preference for a large-scale Node.js project?

0: Starting from Rails

This is the reference point. All the other options are based off this.

|-- app
|   |-- controllers
|   |   |-- admin
@bludnic
bludnic / directions.js
Created April 4, 2017 13:39 — forked from levymetal/directions.js
Tutorial on how to calculate driving distance using Google maps API, full post available @ http://christianvarga.com/how-to-calculate-driving-distance-between-2-locations-with-google-maps-api/
var directionsService = new google.maps.DirectionsService();
var request = {
origin : 'Melbourne VIC', // a city, full address, landmark etc
destination : 'Sydney NSW',
travelMode : google.maps.DirectionsTravelMode.DRIVING
};
directionsService.route(request, function(response, status) {
if ( status == google.maps.DirectionsStatus.OK ) {