Skip to content

Instantly share code, notes, and snippets.

View tomalex0's full-sized avatar

Thomas Alexander tomalex0

  • Universal Music Group
  • Los Angeles, California
View GitHub Profile
@tomalex0
tomalex0 / Express Web Server
Created April 11, 2013 21:13
Webserver using Express with Node js
var express = require('express');
var app = express();
app.use(express.compress());
app.use(express.static(__dirname));
app.listen(process.env.PORT || 3000);
@tomalex0
tomalex0 / NodeJs Web Server
Created April 5, 2013 14:16
NodeJs Web Server
var http = require('http');
var fs = require('fs');
var path = require('path');
http.createServer(function (request, response) {
console.log('request starting...');
var filePath = '.' + request.url;
/* tooltip using css3 */
http://jsfiddle.net/error454/aaDY9/
http://jsfiddle.net/4Dpa3/
http://jsfiddle.net/tomalex0/8fd6N/1/
/*Pseudo Element z-index fix*/
http://jsfiddle.net/imakewebthings/CceAT/
@tomalex0
tomalex0 / Detectdevice
Last active October 11, 2015 13:27
to identify if device is phone,tablet or desktop
var osEnvar= {
name : null,
names: {
ios: 'iOS',
android: 'Android',
webos: 'webOS',
blackberry: 'BlackBerry',
rimTablet: 'RIMTablet',
mac: 'MacOS',
win: 'Windows',