##Ubuntu Server
sudo apt-get install g++ curl libssl-dev apache2-utils git-core make
cd /usr/local/src
wget http://nodejs.org/dist/v0.10.28/node-v0.10.28.tar.gz
tar -xvzf node-v0.10.28.tar.gz
cd node-v0.10.28
/* | |
Licensed to the Apache Software Foundation (ASF) under one | |
or more contributor license agreements. See the NOTICE file | |
distributed with this work for additional information | |
regarding copyright ownership. The ASF licenses this file | |
to you under the Apache License, Version 2.0 (the | |
"License"); you may not use this file except in compliance | |
with the License. You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 |
if (!document.querySelectorAll) { | |
document.querySelectorAll = function (selectors) { | |
var style = document.createElement('style'), elements = [], element; | |
document.documentElement.firstChild.appendChild(style); | |
document._qsa = []; | |
style.styleSheet.cssText = selectors + '{x-qsa:expression(document._qsa && document._qsa.push(this))}'; | |
window.scrollBy(0, 0); | |
style.parentNode.removeChild(style); |
var i=0; | |
function resize() { | |
i=0; | |
// if (navigator.appName == 'Netscape') i=20; | |
if (window.navigator.userAgent.indexOf('MSIE 6.0') != -1 && window.navigator.userAgent.indexOf('SV1') != -1) { | |
i=30; //This browser is Internet Explorer 6.x on Windows XP SP2 | |
} else if (window.navigator.userAgent.indexOf('MSIE 6.0') != -1) { | |
i=0; //This browser is Internet Explorer 6.x | |
} else if (window.navigator.userAgent.indexOf('Firefox') != -1 && window.navigator.userAgent.indexOf("Windows") != -1) { | |
i=25; //This browser is Firefox on Windows |
angular.module('test') | |
.controller('HomeCtrl', function ($scope, $http, Socket) { | |
var vm = this; | |
vm.items = []; | |
vm.lastMsg = ''; | |
$http.get('/api/items').success(function (res) { | |
vm.items = res; |
angular.module('TodoApp', []) | |
.controller('AppCtrl', function($scope, TodoFactory) { | |
$scope.todos = TodoFactory.get(); | |
$scope.addTodo = function($event) { | |
var keyCode = $event.which || $event.keyCode; | |
if (keyCode === 13) { |
var faviconUrl="http://theiotsuitcase.com/assets/ico/apple-icon-60x60.png",css=("background-image: url('"+faviconUrl+"');"+"background-repeat: no-repeat;"+"display: block;"+"background-size: 13px 13px;"+"padding-left: 13px;"+"margin-left: 5px;"),text="Hello 'Under-hood Looker'! Did you loose something or just looking for a way to join us (Contact us: http://thejackalofjavascript.com/portfolio/#/contact)? "; | |
if(navigator.userAgent.match(/chrome/i)){ | |
console.log(text+'%c',css); | |
}else{ | |
console.log('%c '+text,css); | |
} |
/* | |
* Inspired by: http://stackoverflow.com/questions/4360060/video-streaming-with-html-5-via-node-js | |
*/ | |
var http = require('http'), | |
fs = require('fs'), | |
util = require('util'); | |
http.createServer(function (req, res) { | |
var path = 'video.mp4'; |
angular.module('TodoApp', []) | |
.controller('AppCtrl', function($scope, TodoDataFactory) { | |
$scope.todos = TodoDataFactory.get(); | |
var UUID = 0; | |
function addTodo($event) { | |
var keyCode = $event.keyCode || $event.which; | |
if (keyCode === 13 && $scope.todoText) { | |
var todo = { |
<!DOCTYPE html> | |
<html ng-app="TodoApp"> | |
<head> | |
<script src="angular.js"></script> | |
<script src="app.js"></script> | |
<style> | |
ul { | |
list-style: none; | |
} |