Category Archives: Technologies

How to install Jenkins 2.150.1 on Ubuntu 14.04

0. sudo -s
— How to Install Oracle Java 8 on Ubuntu 14.04 LTS —
1. sudo apt-add-repository ppa:webupd8team/java
2. sudo apt-get update
3. sudo apt-get install oracle-java8-installer

— Check the installed Java —-
sudo update-alternatives –config java
sudo update-alternatives –config javac
update-java-alternatives -l
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
echo “$JAVA_HOME”

— How to install Jenkins on Ubuntu 14.04–


 sudo curl -O
apt-key add

wget -q -O - | sudo apt-key add -
sudo sh -c 'echo deb binary/ > /etc/apt/sources.list.d/jenkins.list'
sudo apt-get update && apt-get upgrade -y
sudo apt-get install jenkins

—— Jenkins start on port 8080 ——
—-> nano /etc/default/jenkins
5. sudo service jenkins restart
6. copy the password from cat /var/lib/jenkins/secrets/initialAdminPassword

7. Install Plugins in Jenkins
–> Login to Jenkins dashboard and navigate to Manage Jenkins >> Manage Plugins >> Available Tab and select the plugins to install

$ sudo netstat -peanut | grep ":8000"
$ lsof -i :8000
sudo mount -o bind /var/tmp /tmp   

Sketch plugins









Stacks and Auto-Layout Sketch Plugin Just like Flex Box in CSS, UIStackView in iOS, and FlexboxLayout in Android – Auto-Layout’s with its new Stacks feature is, once again, changing the game: ;





WEB Security

owasp top 10 security standards


SWAT checklist security standards

UI/UX Resources


  • Web Content Accessibility Guidlines (WCAG)
  • Section 508 (US federal standard)
  • The UX HandBook


  • UXPA – The UX Professionals Association 
  • IxDA – The Interaction Design Association 
  • IAI – The Information Architecture Institute

FAQ: RESTful web service with Jersey&Jackson

  • How to do output in JSON format

    public JSONObject sayPlainTextHello(@PathParam("id")JSONObject inputJsonObj) {  
    String input = (String) inputJsonObj.get("input");  
    String output="The input you sent is :"+input;  
    JSONObject outputJsonObj = new JSONObject();  
    outputJsonObj.put("output", output);  
    return outputJsonObj;  


    ClientConfig config = new DefaultClientConfig();  
    Client client = Client.create(config);  
    WebResource service = client.resource(getBaseURI());  
    JSONObject inputJsonObj = new JSONObject();  
    inputJsonObj.put("input", "Value"); System.out.println(service.path("rest").path("hello").accept(MediaType.APPLICATION_JSON).entity(inputJsonObj).post(JSONObject.class,JSONObject.class));

Nginx, PHP 5.3.10 and PHP-FastCGI (PHP5-FPM) on Ubuntu 10.04 (lucid)

The nginx is an open source Web server and a reverse proxy server for HTTP, SMTP, POP3 and IMAP protocols, with a strong focus on high concurrency, performance and low memory usage. Although commonly used to serve static content, it's quite capable of handling dynamic pages as well. This guide will help you get nginx up and running with PHP via FastCGI on your Ubuntu 10.04 (lucid) Linux VPS. To check the Ubuntu version type: lsb_release -a and press Enter.

Set the Hostname

Issue the following commands to make sure it is set properly:

hostname -f

The first command should show your short hostname, and the second should show your fully qualified domain name (FQDN).

Install PHP-FPM: PHP FastCGI Process Manager

PHP-FPM (PHP FastCGI Process Management) is a patch for PHP to improve PHP’s FastCGI capabilities and administration. It is bundled with the official PHP distribution since version 5.3.3.

cd /tmp 
aptitude install python-software-properties 
add-apt-repository ppa:brianmercer/php5
apt-get clean; apt-get update; apt-get upgrade; apt-get dist-upgrade

Install/Update PHP5

Issue the following commands to update your system and install the nginx web server, PHP, and compiler tools:

apt-get install php5 php5-cgi php5-common php5-dev php-pear php5-cli php5-suhosin php5-gd php5-imagick php5-curl php5-mcrypt
apt-get install php5-fpm php5-ldap php5-memcache php-apc php5-mysql php5-sqlite php5-intl
apt-get install php5-snmp php5-tidy php5-xmlrpc php5-xsl php5-json php5-mhash php5-ming php5-ps php5-pspell php5-recode php5-idn php5-imap

pear channel-update 
pear upgrade-all

Optional installation:

 apt-get install pdo pdo_sqlite sqlite 

Start PHP5-FPM

service php5-fpm start 

To check that PHP is listening on port 9000, run the following command:

netstat -ant | grep :9000


tcp        0      0*               LISTEN

Tweak the php-fpm configuration:

nano /etc/php5/fpm/php5-fpm.conf

The following tweaks have been customized for a 512MB-1GB VPS. The line "request_terminate_timeout = 30s" is optional but I highly suggest you use it. It's saying that if a php-fpm process hangs it will terminate it if it continues to hang for 30 seconds. This will add stability and reliability to php application in the event there is a problem.

pm.max_children = 25
pm.start_servers = 4
pm.min_spare_servers = 2
pm.max_spare_servers = 10
pm.max_requests = 500
request_terminate_timeout = 30s

Restart php5-fpm:

service php5-fpm restart

Install NGINX

Append the appropriate stanza to /etc/apt/sources.list. The Pgp page explains the signing of the released packaging. Ubuntu 10.04:

deb lucid nginx
deb-src lucid nginx     

Install Nginx:

apt-get clean; apt-get update; apt-get upgrade; apt-get dist-upgrade
sudo apt-get install nginx   

Installing new version of config file /etc/nginx/fastcgi_params ...
Installing new version of config file /etc/nginx/nginx.conf ...
Installing new version of config file /etc/nginx/mime.types ...
Installing new version of config file /etc/logrotate.d/nginx ...
Installing new version of config file /etc/init.d/nginx ...

Check the version of Nginx: nginx -v or dpkg –print-avail nginx

To start Nginx, run the following command:

service nginx start

To check that Nginx is listening on port 80, run the following command:

netstat -ant | grep :80


tcp        0      0*               LISTEN

Issue with starting Nginx.


nginx: [emerg] bind() to failed (98: Address already in use)

Check runung PID for port 80:

lsof -i tcp:80 or fuser -n tcp 80

Kill processes and run Nginx:

fuser -k 80/tcp ; service nginx restart

Tweak the nginx configuration:

nano /etc/nginx/nginx.conf
user www-data;
worker_processes  1;
error_log  /var/log/nginx/error.log warn;
pid        /var/run/;

events {use epoll; worker_connections  1024; multi_accept on;}

http {
    # Basic Settings
    client_max_body_size 20M;
    client_body_buffer_size 128k;

    include       /etc/nginx/mime.types;
    default_type  application/octet-stream;

    sendfile    on;
    tcp_nopush  on;
    tcp_nodelay on;
    keepalive_timeout  65;
    types_hash_max_size 2048;
        # server_tokens off;
        # access_log off;
        # client_max_body_size 32m;
        # client_body_timeout 60;
        # client_header_timeout 60;
        # send_timeout 60;
        # reset_timedout_connection on;
    # Logging Settings error_log=[debug | info | notice | warn | error | crit]
    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';

    access_log  /var/log/nginx/access.log  main;
    error_log   /var/log/nginx/error.log info;

    # Gzip Settings
        gzip on;
        gzip_min_length 5000;
        gzip_buffers 16 8k;
        gzip_types text/plain text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript application/json;
        gzip_proxied any;
        gzip_comp_level 9;
        gzip_disable "msie6";
        gzip_vary on;
        gzip_http_version 1.1;

        gzip_static on;
        ignore_invalid_headers  on;

    # Virtual Host Configs
        upstream php {
       include /etc/nginx/sites-enabled/*;











Responsive Web Design

Responsive web design (often abbreviated to RWD) is an approach to web design in which a site is crafted to provide an optimal viewing experience—easy reading and navigation with a minimum of resizing, panning, and scrolling—across a wide range of devices (from desktop computer monitors to mobile phones).

5 APIs that will transform the Web in 2013
Changing Times For Web Developers – 6 Tips You Should Read To Survive


  1. Bootstrap
  2. YUI and responsive grids:,, scroll to 43:10
    (although the first talk is very good – if you are familiar with jQuery UI, you will see that YUI one step ahead actually).

How to Mount a Remote Folder using SSH on Ubuntu

Connecting to a server across the internet is much more secure using SSH. There is a way that you can mount a folder on a remove server using the SSHFS service.

There are quite a few steps that you’ll have to follow, so get ready and open a terminal window.

First we’ll install the module:

sudo apt-get install sshfs

Now we will use the modprobe command to load it

sudo modprobe fuse

We’ll need to set up some permissions in order to access the utilities. Replace <username> with your username.

sudo adduser <username> fuse
sudo chown root:fuse /dev/fuse
sudo chmod +x /dev/fusermount

Since we’ve added ourselves to a user group, we need to logout and back in at this point before we continue.

Now we’ll create a directory to mount the remote folder in. I chose to create it in my home directory and call it remoteserv.

mkdir ~/remoteserv

Now we have the command to actually mount it. You’ll be prompted to save the server key and for your remote password.

sshfs <username>@<ipaddress>:/remotepath ~/remoteserv

Now you should be able to cd into the directory and start using it as if it was local.

cd ~/remoteserv
root@ubuntu:~/remoteserv$ ls -l

To unmount sshfs enter this command

fusermount -u ~/remoteserv