Skip to content

Instantly share code, notes, and snippets.

View tracend's full-sized avatar
🎯
Focusing

✌ Makis Tracend tracend

🎯
Focusing
View GitHub Profile
@tracend
tracend / app.configure.js
Created April 2, 2015 09:39
app.configure for Express >v3
// FIX: for express 4.x (.configure() removed)
app.configure = function(a, b){
var type, callback;
if( !b ){
callback = a // assume a is a function?
} else {
type = a;
callback = b;
}
// execute...
@tracend
tracend / v1.js
Last active August 29, 2015 14:18
Custom BodyParser for Express.js
// V1 - basic parser
// Work around instead of using bodyParser
// Source: http://stackoverflow.com/a/9920700/1247359
parser : function(req, res, next) {
var data='';
req.setEncoding('utf8');
req.on('data', function(chunk) {
data += chunk;
});
Handlebars.registerHelper("prettyDate", function (time) {
var date = new Date((time || "")),
diff = (((new Date()).getTime() - date.getTime()) / 1000),
day_diff = Math.floor(diff / 86400);
// exit now if not a number...
if ( isNaN(day_diff)) return;
if ( day_diff < 0 ){
// this is in the future...
@tracend
tracend / makesites-insider-201503.md
Last active August 29, 2015 14:16
Introducing: Internet, in a can! #makesites #insider

Introducing: Internet, in a can!

Have you ever had that bittersweet feeling of crossing paths with a special someone and knowing that if you don't act now any chance you had to relate will be gone and lost forever? That's where we are, humanity as a whole, facing the Web today...


Despite common belief, the current state of the Web is close to ideal. Not on a technical level but rather its fundamental architecture. The barrier of entry is minimal and there's this concept that the Web is free and embracing of every human expression. This should not be taken for granted. In fact there are very few things in life that can match this level of freedom.

Our lives are mostly regulated and people are channeled to expected behaviors. Corporations rule the real world and under their reign our lives have become comfortable and predictable. This was of course what humanity wanted, to establish order, and it's a task that corporations can excel at; that's why we've promoted them to leaders in our society

@tracend
tracend / aws.json
Last active August 29, 2015 14:15
Config schema
{
"key" : "1234567890",
"secret" : "abcdefghijklmnopqrstuvwxyz",
"s3" : {
"bucket" : "",
"path" : "/",
"region" : "us-east-1",
"acl" : "public-read"
},
"hosts" : {
@tracend
tracend / makesites-insider-201502.md
Last active August 29, 2015 14:14
Surviving Virtual Reality #makesites #insider

Surviving Virtual Reality

We've heard the news, we've seen the demos. Now we're wondering how is VR going to affect our lives. Here is an in depth analysis on how the human spirit could cope in a virtual environment... vastly based on our human nature and common psychology rather than scientific predictions.


Some see VR as an ominous reality, recalling images of the Matrix or the Lawnmower man; admittedly mostly non-technical people. At the same time, the tech community is celebrating the innovation and breakthrough technology. No one is even considering the consequences of this technology in our everyday lives, only how it will be applied; a mental blindness much like during the Manhattan Project, making the realization beyond the technical achievement a late afterthought.

Virtual reality by definition is a different reality. It is allowing the p

@tracend
tracend / create_drone.sh
Last active February 26, 2017 14:43
Create a new Drone from scratch on CentOS with the bare minimum software (git, node, redis, monit)
# main software
sudo yum update
sudo yum install gcc-c++ make
sudo yum install openssl openssl-devel
sudo yum install git
sudo yum install wget #optional
# Install Node.js (contains npm…)
cd ~
@tracend
tracend / gist:89c146afde84720d29c8
Created January 8, 2015 13:12
Minimal SSL setup in Node.js for Localhost
// HTTPS
var https = require('https');
var fs = require('fs');
var options = {
key: fs.readFileSync('/Users/{{USER}}/Repositories/Internal/dev/ssl/server.key'),
cert: fs.readFileSync('/Users/{{USER}}/Repositories/Internal/dev/ssl/server.crt'),
requestCert: false,
rejectUnauthorized: false
};
@tracend
tracend / makesites-insider-201501.md
Last active August 29, 2015 14:12
The "real" developer #article #makesites #insider

The "real" developer

In the 90s you would often hear on MTV the phrase "keep it real". Basically it means "be true to who you are"; it was the normal attitude when alternative rock was at the forefront of popular music. But what does all this have to do with developing?


Being "real" is on the opposing side of the trend that followed and furthermore what developers are still facing today. I'm talking about political correctness. In the post-millennium era we've grown to think that being politically correct is better, with the consensus that being "real" is just ugly.

There's virtually no argument today when you are asked to do what you're "supposed to", follow "the process" and not "confront" anyone, even when you are right. And each and every one of these directives has its roots in political correctness; which I'll just go ahead and say that it's just "rebranding" conservatism.

@tracend
tracend / makesites-insider-04.md
Last active August 29, 2015 14:10
Ready for Network-based 3D #makesites #insider

Ready for Network-based 3D

This is an anniversary piece to commemorate two years since the conception of Construct. It is also a call to action for everyone interested in participating in the next wave of realtime 3D

WebGL is officially supported in all platforms that matter and there's been a lot of movement towards creating concept 3D applications in the browser. These past years we all experimented, created libraries, gave talks, wrote articles. But all this is still not enough.

The current state is problematic