Skip to content

Instantly share code, notes, and snippets.

View jaydson's full-sized avatar
🏠
Working from home

Jaydson Gomes jaydson

🏠
Working from home
View GitHub Profile
var http = require("http"),
url = require("url"),
path = require("path"),
fs = require("fs")
port = process.argv[2] || 8888;
http.createServer(function(request, response) {
var uri = url.parse(request.url).pathname
, filename = path.join(process.cwd(), uri);
@jaydson
jaydson / README.md
Created February 19, 2013 20:35 — forked from oodavid/README.md

Deploy your site with git

This gist assumes:

  • you have a local git repo
  • with an online remote repository (github / bitbucket etc)
  • and a cloud server (Rackspace cloud / Amazon EC2 etc)
    • your (PHP) scripts are served from /var/www/html/
    • your webpages are executed by apache
  • apache's home directory is /var/www/
Error in user YAML: (<unknown>): did not find expected comment or line break while scanning a block scalar at line 1 column 1
---

> **Atenção**: esse guia está em fase de construção, esperamos sua contribuição :)

---

Como organizar um evento Front-End?

Um guia elaborado por membros da BrazilJS Foundation para auxiliar aqueles que procuram organizar um evento sobre desenvolvimento front-end no Brasil.

@jaydson
jaydson / uri.js
Created May 10, 2012 03:42 — forked from jlong/uri.js
URI Parsing with Javascript
var parser = document.createElement('a');
parser.href = "http://example.com:3000/pathname/?search=test#hash";
parser.protocol; // => "http:"
parser.hostname; // => "example.com"
parser.port; // => "3000"
parser.pathname; // => "/pathname/"
parser.search; // => "?search=test"
parser.hash; // => "#hash"
parser.host; // => "example.com:3000"
js> isNaN(null);
false
js> null > -1;
true
js> null < 1;
true
js> null > 0;
false
js> null < 0;
false