Tuesday, May 20, 2014

Setting CORS (cross origin resource sharing) headers in node.js express app

There is a question: http://stackoverflow.com/questions/7067966/how-to-allow-cors-in-express-nodejs

The essential part was here:

app.configure(function() {
// has to be in that order ! ! !
app.use(express.static(__dirname + '/static'));
// will NOT work like that
// for files served statically
// (it took a little while to figure it out)
// app.use(express.static(__dirname + '/static'));
// app.use(cors());
I encourage you to use Nitrous - reflink - because you are up and running in no time, think jsFiddle jsBin codepen plnkr for node apps. On this occasion Rubber Duck method proved itself useful (as always) so no silly questions posted to StackOverflow.

Thursday, February 27, 2014

React Atom (trends in logo design)

Atom by GitHub:

React by Facebook:

[updated] Default icon for apps on Facebook:
[update Wednesday 12 March 2014]

Rocket Yoga by Michal Stefanow:

(actual design work by Mateusz Sarnecki)

I think that apple was first, I remember to use them as reference when crafting the brief:

If we go back to 2011:

I believe I was one of the first to use Cabin Sketch, soon after I started seeing it everywhere! See GoogleTrends graphs below:

Now I expect to see many more logos with atom / nucleus / source / origin / divine / pristine / indigenous / native touches in it :)

Wednesday, January 22, 2014

Stack Overflow licensing virus

TL;DR - if you ever used a snippet of code from StackOverflow you must immediately open-source your app under CreativeCommons license.

Favorite quotes:

1. "This worries me for developing proprietary software, because now the app is not fully owned by my company anymore (and pieces are just licensed off SO). Our legal guys are probably not going to be happy with that."

2. "Corporations will dislike the legal 'littering' of the code."

3. "However, if someone posts an implementation of something and you copy it verbatim in to your app, your app has now been infected with the creative commons cancer, and you MUST release it under the cc-sharealike license."

4. "Don't ever cut/paste code you found on the Internet if you are working on a commercial product."

5. "For commercial work, you should see your company lawyer before using any code from SO."

So let me clarify what we mean by attribution. If you republish this content, we require that you:
  1. Visually indicate that the content is from Stack Overflow or the Stack Exchange network in some way. It doesn’t have to be obnoxious; a discreet text blurb is fine.
  2. Hyperlink directly to the original question on the source site (e.g., http://stackoverflow.com/questions/12345)
  3. Show the author names for every question and answer
  4. Hyperlink each author name directly back to their user profile page on the source site (e.g., http://stackoverflow.com/users/12345/username)

I'm sorry, I'm too lazy to comply with the licensing terms... Well... I'm not willing to risk, digging thru and linking to original authors. I don't want to screw my career early on. Authors of the quotes:
1. Evert
2. Evert
3. waffles
4. user133907
5. skympt (no profile page = no link)

This post is licensed under: http://creativecommons.org/licenses/by-sa/3.0/legalcode

What do you think about viral licensing?
+ In the draft version of this post I didn't have links to specific authors (too lazy). Does it mean that anyone can access drafts of other posts? Please sue me, and good luck proving that there links were missing - I would reply that this paragraph is just a PR stunt.