DevTech101

DevTech101

Applications

Java hashmap single key Multiple Values

Default java library import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; Google java library import java.util.Set; import com.google.common.collect.ArrayListMultimap; import com.google.common.collect.Multimap; Apache java library package com.sqlitedb.examples.util.map; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; Full working example /** * * @author Eli Kleinman */ public class TestArr { public void TestArr() { // create map to …

Java hashmap single key Multiple Values Read More »

How To Create a Python Socket Server

Create the Python Socket Server #!/bin/python import socket host = ‘10.10.10.10’ port = 50000 backlog = 5 size = 1024 s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.bind((host,port)) s.listen(backlog) while 1: client, address = s.accept() data = “Return data\n” client.send(data) client.close() Create the client connection #!/bin/python import socket host = ‘10.10.10.10’ port = 50000 backlog = 5 size …

How To Create a Python Socket Server Read More »

how to install Openstack kilo on Solaris 12 with oVS

First install MySQL and openstack pkg install mysql-56 pkg:/database/mysql-56/client openstack service/network/openvswitch MySQL configuration zfs create -o mountpoint=/mysql rpool/mysql mkdir /mysql/logs mkdir /mysql/innodb cp /etc/mysql/5.6/my.cnf /mysql/ cd /etc/mysql/5.6/; mv my.cnf my.cnf.orig; ln -s /mysql/my.cnf chown -R mysql:mysql /mysql sample my.cnf # For advice on how to change settings please see # http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html [mysqld] default-storage-engine = InnoDB …

how to install Openstack kilo on Solaris 12 with oVS Read More »

How to set NPM proxy settings in .npmrc

Below you will find, how to set a proxy for Node/NPM by using an .npmrc file. cat .npmrc proxy=http://user:passsword@host.domain.com:8080/ https-proxy=http://user:passsword@host.domain.com:8080/ strict-ssl=false registry=http://registry.npmjs.org/ To make node js or npm work behind a firewall To get node compiled on Solaris check out the link below. http://www.petertribble.co.uk/Solaris/node.html Note: after pkgadd, move Node to node. also modify this file …

How to set NPM proxy settings in .npmrc Read More »

OpenStack / Solaris 11.3 (Kilo) – Part one

First we need to create a Virtual Router and Load Balancer Note: The Full Kilo setup can be found here – How To Install Openstack Kilo On Solaris-12 With OVS Will use vrrp v3 (solrias tech) Install needed packages pkg install vrrp Disable redirects ipadm set-prop -p send_redirects=off ipv4 on first node The example below …

OpenStack / Solaris 11.3 (Kilo) – Part one Read More »

Solaris NodeJS zone install and configuration

Solaris NodeJS zone install and configuration First, lets Compile NodJS from source, get the source from the NodeJS website. Something like the below should work to compile. env CC=gcc ./configure –prefix=/opt/node-v6.2.2 # for 8 cpu’s gmake -j 8 gmake install Next, lets modify the zone properties and distribute the compiled bundle to all the Solaris …

Solaris NodeJS zone install and configuration Read More »