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
# install a plain ubuntu with openssh server with 50Gb dynamic drive | |
# | |
apt-get update | |
apt-get dist-upgrade | |
# | |
# clone the image | |
# | |
# install mongodb on cloned image | |
apt-get install -y mongodb | |
# |
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
root@ubuntu:~# docker run -t -i ubuntu /bin/bash | |
root@e7ec762cee11:/# apt-get update && apt-get install apache2 | |
root@e7ec762cee11:/# exit | |
root@ubuntu:~# docker commit e7ec762cee11 asiletto/test | |
root@ubuntu:~# docker run --name ap1 -d -p 80:80 asiletto/test /usr/sbin/apache2ctl -D FOREGROUND | |
root@ubuntu:~# links http://localhost/ |
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
Netmask Netmask (binary) CIDR Notes | |
_____________________________________________________________________________ | |
255.255.255.255 11111111.11111111.11111111.11111111 /32 Host (single addr) | |
255.255.255.254 11111111.11111111.11111111.11111110 /31 Unuseable | |
255.255.255.252 11111111.11111111.11111111.11111100 /30 2 useable | |
255.255.255.248 11111111.11111111.11111111.11111000 /29 6 useable | |
255.255.255.240 11111111.11111111.11111111.11110000 /28 14 useable | |
255.255.255.224 11111111.11111111.11111111.11100000 /27 30 useable | |
255.255.255.192 11111111.11111111.11111111.11000000 /26 62 useable | |
255.255.255.128 11111111.11111111.11111111.10000000 /25 126 useable |
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
#install & minimal mysql config (starting point for a docker container) | |
apt-get update | |
#apt-get update && apt-get upgrade -y | |
echo "mysql-server-5.6 mysql-server/root_password password root" | sudo debconf-set-selections | |
echo "mysql-server-5.6 mysql-server/root_password_again password root" | sudo debconf-set-selections | |
apt-get -y install mysql-server-5.6 | |
sed -i 's/127\.0\.0\.1/0\.0\.0\.0/g' /etc/mysql/my.cnf | |
mysql -uroot -proot -e 'USE mysql; UPDATE `user` SET `Host`="%" WHERE `User`="root" AND `Host`="localhost"; DELETE FROM `user` WHERE `Host` != "%" AND `User`="root"; FLUSH PRIVILEGES;' | |
service mysql restart | |
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
#generate maven from archetype | |
mvn archetype:generate \ | |
-DgroupId=it.siletto \ | |
-DartifactId=simpleProject \ | |
-DarchetypeArtifactId=maven-archetype-quickstart \ | |
-DinteractiveMode=false | |
#generate eclipse metadata | |
mvn eclipse:eclipse -DdownloadSources=true |
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
aggiungere sul client ftp il comando | |
SITE SBD=(IBM-1047,ISO8859-1) | |
subito dopo la connessione. | |
si puo' fare con WinSCP |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Test dojo singleton</title> | |
</head> | |
<body> | |
<!-- load Dojo --> | |
<script src="dojo.js" | |
data-dojo-config="async: true"></script> |
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
define(["dojo/_base/declare"], function(declare){ | |
var TestApp = declare(null, { | |
constructor: function(){ | |
console.log("constructor is called only once"); | |
this.key = Math.random(); | |
}, | |
sayHello : function(){ | |
alert("hello: "+this.key); | |
} | |
}); |
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
Display display = getWindowManager().getDefaultDisplay(); | |
DisplayMetrics outMetrics = new DisplayMetrics(); | |
display.getMetrics(outMetrics); | |
float density = getResources().getDisplayMetrics().density; | |
float dpHeight = outMetrics.heightPixels / density; | |
float dpWidth = outMetrics.widthPixels / density; | |
Log.d("SIZE","height: "+dpHeight+"dp, width:"+dpWidth+"dp, orientation:"+display.getRotation()); |