##Backup script for mega
#NGINX site Generator generate a config file for html site or python,node site with passenger.
usage:
./nginx-genconfig.sh python|html|node [OPTION]"
option:
-f root folder of the site
-d subdomain of the site
-o output file name
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# This script start all the Hadoop demons and initialize the Hadoop File System with same data | |
# (Fill up the above variable) | |
# | |
HADOOP_PATH=#path to the Hadoop installation | |
DATA_PATH=#path to the data to put in the hadoop DFS | |
$HADOOP_PATH/stop-all.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
printf "Install all the dependencies..\n" | |
sudo apt-get update | |
sudo apt-get install -y mercurial python3-dev python3-numpy libsdl-dev libsdl-image1.2-dev \ | |
libsdl-mixer1.2-dev libsdl-ttf2.0-dev libsmpeg-dev libportmidi-dev \ | |
libavformat-dev libswscale-dev libjpeg-dev libfreetype6-dev | |
printf "\nDownload pygame source..\n" | |
cd /tmp | |
hg clone https://bitbucket.org/pygame/pygame |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <thread> | |
#include <unistd.h> | |
using namespace std; | |
int main(int argc, char* argv[]){ | |
thread([](){ | |
for(char symbol = 0;;usleep(100000)){ | |
cout << "\r" << (0==++symbol%4?"|": | |
1==symbol%4?"/": |
Change the URL with the professor page and run
URL=http://didawiki.cli.di.unipi.it/doku.php/magistraleinformaticanetworking/cpa/start &&\
wget -O- $URL | \
sed -n 's@.*<a href="\(.*\)" class.*Slides</a>.*@http\:\/\/didawiki.di.unipi.it\/\1@p' | \
wget -c -i -
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# initialization file (not found) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use File::Basename; | |
# STOP WORDS FOLDER | |
my $stp = "/home/andrea/Downloads/DataMining/code/data/"; | |
# STOP WORDS FILE | |
my $stf = "stopwords.txt"; | |
# DATA MAIN PATH | |
my $dp = "/home/andrea/Downloads/DataMining/code/dwld/Gutenberg/dwdl/stripped/"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var app = require('express')(); | |
var http = require('http'); | |
app.get('/', function (req, res) { | |
http.get('http://127.0.0.1:8000/person', | |
function (resApi) { | |
res.writeHead(resApi.statusCode); | |
resApi.pipe(res); | |
} | |
).end(); |
OlderNewer