This file contains 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
const Path = require('path'); | |
var fonts = { | |
Roboto: { | |
normal: Path.join(__dirname, 'fonts/Roboto-Regular.ttf'), | |
bold: Path.join(__dirname, 'fonts/Roboto-Medium.ttf'), | |
italics: Path.join(__dirname, 'fonts/Roboto-Italic.ttf'), | |
bolditalics: Path.join(__dirname, 'fonts/Roboto-MediumItalic.ttf') | |
} | |
}; |
This file contains 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 _ = require('lodash'); | |
var HD = require('hd').utils; | |
var Domains = require('hd').domains; | |
var Redis = require("redis"); | |
var internals = { }; | |
internals = { | |
client: null, | |
connected: false |
This file contains 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
// CRUD for the CoverLetter | |
// Author: Augusto Pissarra | |
var _modelName = "cartasdet"; | |
var _renderOrder = ["login", "menu", _modelName]; | |
var _pageTitle = HS.get("Professional Central"); | |
var _pageName = HS.get("Cover Letter"); | |
var _pageTitleCls = 'icon-user'; | |
var _breadcrumbs = [ |
This file contains 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 _ = require('lodash'); | |
var Mongoose = require('mongoose'); | |
var Mongoosastic = require('mongoosastic') | |
var Behaviours = require("hd-behaviours"); | |
var Decorators = require("hd-decorators"); | |
var Async = require('async'); | |
var HD = require('hd').utils; | |
var Domains = require('hd').domains; | |
var SanitizerPlugin = require('mongoose-sanitizer'); | |
var HStatus = require('hd-status'); |
This file contains 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 SignedXml = require('xml-crypto').SignedXml; | |
var FileKeyInfo = require('xml-crypto').FileKeyInfo; | |
LocalSchema.statics.sign = function(options, cb) { | |
var user = options.user; | |
if(user.orgId !== options.payload.orgId) { | |
return cb(HD.errors.unauthorizedAction, {}); | |
} |
This file contains 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 Args = require('commander'); | |
Args | |
.version('0.0.1') | |
.option('-s, --servertype [type]', 'Type of the server location: dev, test, accept or prod') | |
.option('-r, --routes [routes]', 'A comma separeated routes: admin,server') | |
.option('-e, --environment [environment]', 'If we are running on windows, mac or linux. Default is mac.') | |
.parse(process.argv); | |
process.env["servertype"] = Args.servertype ? Args.servertype : "dev"; | |
process.env["environment"] = Args.environment ? Args.environment : "mac"; |
This file contains 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
# Get Graphics Magick | |
> cd / | |
> mkdir /dowload | |
> cd /download | |
> wget ftp://ftp.graphicsmagick.org/pub/GraphicsMagick/GraphicsMagick-LATEST.tar.gz | |
> tar -xzvf GraphicsMagick-LATEST.tar.gz | |
> cd GraphicsMagick-1.3.21 (or the lastest graphics magick) | |
# Install Graphics Magick | |
## Get libs |
This file contains 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
/ At the client, just use a normal post. I use jQuery and do an AJAX post | |
// In your HTML | |
<form id="uploadForm" autocomplete="off" action="" method="post" enctype="multipart/form-data"></form> | |
<input id='fileId' type="file" accept="image/*"> | |
// In you JS | |
var $form = $('#uploadForm'); | |
var $file = $('#fileId'); |
This file contains 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
## On Windows: | |
``http://www.graphicsmagick.org/INSTALL-windows.html`` | |
## On the Mac: | |
``brew install graphicsmagick`` | |
## On the Joyent box: | |
``` |
This file contains 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
// Client file | |
//***** hdCrawl ******// | |
// dependencies | |
// * lodash or underscore | |
// * jQuery | |
// Providers | |
hdCrawlProviders = { |
NewerOlder