Skip to content

Instantly share code, notes, and snippets.

View albertosouza's full-sized avatar
👨‍🔬
Creating things

Alberto Souza albertosouza

👨‍🔬
Creating things
View GitHub Profile
@albertosouza
albertosouza / local.js
Created July 31, 2014 20:40
We.js clientside local.js config
module.exports = {
appName: 'We.js',
fileUploadPath: 'uploads/files',
imageUploadPath: 'uploads/images',
/**
@albertosouza
albertosouza / sails-acl-npm-module-proposal.md
Last active February 10, 2016 13:14
A Sails.js ACL with Roles / permissions configs proposal ... based in sails police

A ⛵ Sails.js ACL proposal ... based in polices

Please help build that feature with ideas 💭 here ... or code and tests here: https://github.com/wejs/sails-acl

How it will work? ...

What dependecies we need in our project?
  • User model - TODO add example link
@albertosouza
albertosouza / sails.config.getter.md
Last active August 29, 2015 14:05
Sails.js config getter funcion

If i try to get one sub depth attribute in sails.config and a sub attribute dont exists it will return a error but if i have a getter it can return a undefined even if a sub attribute dont exists

This is a good feature to core or is best to write a npm module (sails.utils.extra?) and plug this helpers with hook or bootstrap function?

May be something like:

/**
 * Get one sails.js config getter
 * 
@albertosouza
albertosouza / wejs.local.js
Created September 17, 2014 12:52
Exemplo de local.js do we.js
/**
* file: config/local.js
*
* Local environment settings
*
* While you're DEVELOPING your app, this config file should include
* any settings specifically for your development computer (db passwords, etc.)
*
* When you're ready to deploy your app in PRODUCTION, you can always use this file
* for configuration options specific to the server where the app will be deployed.
{
"estados": [
{
"sigla": "AC",
"nome": "Acre",
"cidades": [
"Acrelândia",
"Assis Brasil",
"Brasiléia",
"Bujari",
@albertosouza
albertosouza / we.js-v0.3.x-install-ubuntu-15_04.sh
Last active September 29, 2015 16:57
How to install we.js v0.3.x in Ubuntu
#!/bin/bash
#node
sudo apt-get install curl
curl -sL https://deb.nodesource.com/setup_0.12 | sudo bash -
sudo apt-get install nodejs
#mysql
sudo apt-get install mysql-server mysql-client
@albertosouza
albertosouza / GPL.md
Created October 19, 2015 10:33 — forked from jnrbsn/GPL.md
A Markdown-formatted GPL for your GitHub projects.

GNU GENERAL PUBLIC LICENSE

Version 3, 29 June 2007

Copyright © 2007 Free Software Foundation, Inc. <http://fsf.org/>

Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.

O we messenger hoje possuí uma estrutura distribuída distribuída com um app de cliente ember.js e a API (server) com we.js e o plugin we-plugin-messenger

Repositórios relacionados:

Como montar a estrutura de serviços?

1- Clonar e instalar o projeto do site do We.js https://github.com/wejs/site

@albertosouza
albertosouza / meta-tags.md
Created October 29, 2015 17:57 — forked from kevinSuttle/meta-tags.md
List of Usable HTML Meta and Link Tags

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta charset='UTF-8'>
<meta name='keywords' content='your, tags'>
<meta name='description' content='150 words'>
<meta name='subject' content='your website's subject'>
<meta name='copyright' content='company name'>
@albertosouza
albertosouza / graphics_magick_center_image_on_canvas.js
Created October 31, 2015 18:24 — forked from edwardhotchkiss/graphics_magick_center_image_on_canvas.js
Use GM Module (Graphics Magick) for Node.js to center an image on a white background canvas
var gm = require('gm');
var canvasWidth = 248;
var canvasHeight = 389;
gm(__dirname + '/original.jpg').size(function(error, size) {
if (error) {
console.error(error);