- Note: This file includes markup. Until we incorporate .md markup, [you can read the html version here] (https://gist.github.com/nvasilakis/8605902#file-lab1-md)
-
10' VM/Linux setup and issues
-
30' Shell (bash, scripting, zsh, screen, environment)
10' VM/Linux setup and issues
30' Shell (bash, scripting, zsh, screen, environment)
| // Take for example the following methods: | |
| void method_1(int a, out int b, ref int c) { | |
| //implementation | |
| } | |
| void method_2(Object o, out Object p, ref Object q) { | |
| //implementation | |
| } | |
| // Which are later called with values |
| The objective of this post is to get you from absolutely nothing, to a fully functional nodejs environment. | |
| Software used: Ubuntu 11.10, Nodejs v0.6.12, Nginx, MongoDB, Redis, and NPM modules. | |
| 1. Download and install the latest version of Ubuntu: http://www.ubuntu.com/download (don't select any extra items to install when prompted) | |
| 2. Once you are logged in and are at your Ubuntu command prompt, install the necessary software you will need: | |
| a. sudo apt-get install openssh-server | |
| b. sudo apt-get install libssl-dev | |
| c. sudo apt-get install git | |
| d. sudo apt-get install g++ | |
| e. sudo apt-get install make |
| #!/bin/sh | |
| # | |
| # chkconfig: 35 99 99 | |
| # description: Node.js /home/nodejs/sample/app.js | |
| # | |
| . /etc/rc.d/init.d/functions | |
| USER="nodejs" |
| sudo apt-get update | |
| sudo apt-get upgrade | |
| sudo apt-get install nginx | |
| sudo service nginx start | |
| sudo apt-get install python-software-properties | |
| sudo apt-add-repository ppa:chris-lea/node.js | |
| sudo apt-get update | |
| sudo apt-get install nodejs | |
| sudo mkdir /var/www/ |
| Ten years after TCP’s development, theoretical analyses showed that TCP’s | |
| congestion-control algorithm serves as a distributed asynchronous-optimization | |
| algorithm that results in several important aspects of user and network performance | |
| being simultaneously optimized [Kelly 1998]. A rich theory of congestion control | |
| has since been developed [Srikant 2004]. | |
| Using this formula, we can see that in order to achieve a throughput of 10 Gbps, | |
| today’s TCP congestion-control algorithm can only tolerate a segment loss probabil- | |
| ity of 2 · 10–10 (or equivalently, one loss event for every 5,000,000,000 segments)— | |
| a very low rate. This observation has led a number of researchers to investigate new |
| using Rest; | |
| public class SimpleTweet { | |
| private static const string CONSUMER_KEY = "#######################"; // this comes from your app's twitter account page | |
| private static const string CONSUMER_SECRET = "########################################"; // this comes from your app's twitter account | |
| private static const string URL_FORMAT = "https://api.twitter.com"; | |
| private static const string REQUEST_TOKEN_URL = "https://api.twitter.com/oauth/request_token"; | |
| private static const string FUNCTION_ACCESS_TOKEN = "oauth/access_token"; | |
| private static const string FUNCTION_STATUSES_UPDATE = "1/statuses/update.xml"; |
| # Install scapy on osx | |
| # grap libnet | |
| wget http://libdnet.googlecode.com/files/libdnet-1.12.tgz | |
| tar xfz libdnet-1.12.tgz | |
| ./configure | |
| make | |
| sudo make install | |
| cd python | |
| python2.5 setup.py install |