Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View andreloty's full-sized avatar

André Lima andreloty

View GitHub Profile
@andreloty
andreloty / gist:5a8fa7b5256ed2dfd05c941c4d44fbec
Created February 23, 2018 01:31
./bin/www com socket.io
#!/usr/bin/env node
/**
* Module dependencies.
*/
var app = require('../app')
var debug = require('debug')('knex:server')
var http = require('http')
@andreloty
andreloty / gist:5c2152b1f87ac7e569a781d95bd51d9d
Last active February 23, 2018 01:53
set reloadify on express
// set reloadify
if (process.env.NODE_ENV !== 'prodution') {
var reloadify = require('reloadify')([
__dirname + '/views',
__dirname + '/public',
])
app.use(reloadify)
}
@andreloty
andreloty / gist:931d80540f2acff69058d00f3b03e56b
Created December 18, 2017 18:45
summernote clear format
var cleanText = $('#summernote').data().summernote.code()
.replace(/<\/p>/gi, "\n")
.replace(/<br\/?>/gi, "\n")
.replace(/<\/?[^>]+(>|$)/g, "")
{
"black": "#002b36",
"dark_blue": "#81A2BE",
"dark_green": "#01e327",
"dark_cyan": "#81d6ff",
"dark_red": "#dc322f",
"dark_magenta": "#d33682",
"dark_yellow": "#b58900",
"gray": "#eee8d5",
"dark_gray": "#019393",
@andreloty
andreloty / hotfix.txt
Last active February 13, 2016 14:37
Hotfix instalation npm
echo prefix = ~/.node >> ~/.npmrc
export PATH=$HOME/.node/bin:$PATH