Skip to content

Instantly share code, notes, and snippets.

View tracend's full-sized avatar
🎯
Focusing

✌ Makis Tracend tracend

🎯
Focusing
View GitHub Profile

Float label

A web component that create a CSS-only floating label for input tags

@tracend
tracend / underscore.isURL.js
Last active August 29, 2015 14:04
_.isURL() #underscore #mixin #cc
_.mixin({
// - Checks if a string is a full URL
// Source: https://gist.github.com/tracend/a522e5a169aad662fa80
isURL: function ( url ) {
// prerequisite
if( typeof url != "string" ) return false;
//
return ( url.substr(0, 4) == "http" || url.substr(0, 2) == "//" );
}
});
@tracend
tracend / underscore.getDir.js
Last active August 29, 2015 14:04
_.getDir() #underscore #mixin #cc
_.mixin({
// - Returns the directory of a url or full path
// Source: https://gist.github.com/tracend/31436d82befafab96d15
getDir: function ( url ) {
// prerequisite
if( typeof url != "string" ) return "";
//
var location = url.match(/^.*[\\\/]/);
// return if there are any matches...
return ( location !== null ) ? location[0] : "";
@tracend
tracend / .terminal.text.md
Last active August 29, 2015 14:06
Terminal Text
@tracend
tracend / makesites-insider-02-20140917.md
Last active August 29, 2015 14:06
Decentralized is the new Online #article #makesites #insider

Decentralized is the new Online

Our lives are intertwined with the Internet. Our media, our communication, our favorite services, all live online. The "cloud" has evolved from a novelty to an intimate part of our everyday reality. People have already started wondering if our dependence to being online is healthy. But now that we're here, how can we ever go back to living without it?


Let me start with a short disclaimer. This is not going to be an essay infused with nostalgia of the "good ol' days" and cynicism towards the Internet. I love the concept and potential of being online. Everything I produce is published online. My main concern is the way my work is planned and executed, so it is relevant in the upcoming years. Hope you feel the same...

The Internet is Centralized

Some think of it as a network of servers, some as a "series of tubes" but truth of the matter is that the Internet has been re

@tracend
tracend / handlebars.size.js
Last active August 29, 2015 14:06
Handlebars.size: get the size of an object #handlebars #helper #cc
// Handlebars.size: get the size of an object
// Source: https://gist.github.com/tracend/71e3cb5069edaa0bceae
Handlebars.registerHelper('size', function(obj) {
// prerequisite
if( typeof obj != "object" ) return;
var size = 0, key;
for (key in obj) {
if (obj.hasOwnProperty(key)) size++;
}
return size;
@tracend
tracend / handlebars.copyright.js
Last active August 29, 2015 14:07
Handlebars.copyright: render copyright text #handlebars #helper #cc
@tracend
tracend / build.js
Last active August 29, 2015 14:07
Build script using Node.js
// # Build script using Node.js
//
// Single script build,used as a lightweight alternative
// when a build platform (grunt/gulp wtc.) feels like overkill
//
// - Dependencies: NPM/Node.js
// - Conventions:
// * code is in a lib/ folder with a main.js as the main context (closure)
// * a package.json on the root contains all the info about the lib: name, description, author, license
// * compiled files are saved in a build folder
@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

@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.