Posts

Building my Homeserver : Operating System

Image
It’s the second part of my homeserver build. You can find the first part here . I have initially planned to use NAS4Free for the os. But later changed to Centos 7 as Redhat distributions were my favourite one. And also i would like use GitLab and need run the server as well as NAS server as well as a testing Home Server. As it’s hard to use a  wired  connection to the router i compelled to use a Wifi dongle which will not be supported by the NAS4Free. First installed Centos 7 ( 1406 ) minimal install. To my surprise it detected the WIfi dongle i have used the static ip of 192.168.1.250. Using RAID 10 in my 4 500GB HDD i have successfully installed the server and also i have installed the Webmin which will accesible through https://192.168.1.250:10000 . But when i updated the packages the Wifi simply stop to work. It’s showing in the nmtui but not activating . It’s status is DOWN. Then i downloaded Centos 7 ( 1503 ) and reinstalled it. The problem is it’s showing in the...

Building my Homeserver : Hardware

Image
I have been planning to build a cheap home server since my external HDD failed unexpectedly. My initial search leads to FreeNAS. But after posting foolish questions in forum i found out that it requires better hardware as it’s based on ZFS. ECC supported RAM and MOBO will be a cost overhead for my rig as i decided to go for some second hand hardware. Then i found this NAS4Free. It’s not simple as FreeNAS but it’s based on UFS so it need not be a heavy hardware. I bought a second hand i3 pc with four hdd and ran NAS4free for 3-4 days. One of it’s hdd failed sometime. I think the problem is with the PSU. So i bought a new Corsair vs450 .So that’s my rig. Lets see the spec. Mobo : Intel Desktop Board DH55TC CPU : Core i3 530 @ 2.93Ghz RAM : 2GB Kingston PSU : Corsair vs450 HDD : 1 x 500GB WD Green 3 X 500GB Seagate Here is some pictures :  Front : My 140MM deepcool Fan  Side View  HDD bay Mobo Ram My Cable Man...

MEAN js adding a CRUD module

Image
it's continuation of previous post . Lets try to add  a new CRUD module to the app. First create a new module using the yo generator. We will create a new module to add a company name and it's location. yo meanjs:crud-module company It will ask some questions. Need to specify angular folders. Select all those. Next it will ask about menu. whether it need to be added or not. type 'Y' so it will create those links. So the module is loaded. If you check the app folder you will find some new files in the app. Currently it had option to add the name only. We will add location also. Lets edit that. Navigate to  model app/models/ and open company.server.model.js . This file consist the model of the module 'company'. This will define the mongoose schema . Lets add properties for this schema. var mongoose = require('mongoose'), Schema = mongoose.Schema; var CompanySchema = new Schema({ name: { type: String, default: '', req...

MEAN js Application structure

It's a continuation of previous post . Lets discuss about the application structure in a MEAN.js Application. Actually MEAN follows a MVC(Model-View-Controller). There are mainly two types of application structure for MVC. 1. Horizontal Folder Structure         This type of structure follows the division on functional role rather than the feature.The files and folders will kept inside a application folder .  There will be one controller folder for all application controllers. Horizontal structure is for simple projects where the features were limited. An example for this structure is app ----controllers ----models ----routes ----views config ----env ----strategies ----config.js ----express.js public ----config ----controllers ----directives ----css ----filters ----images ----views ----services server.js package.json app folder consists of all the express.io files or the server side files. app/controllers folder holds all express controller logic. a...

Getting Started with MEAN.js

Image
Recently am into Javscript development like node, angular etc. And i came across this awsome stack just like WAMP . It's called MEAN and am so much excited about this stack. MEAN stands for  Mongodb ]- The Database Express - The serverside framework Angular - The Client side MVC framework Node.js - the server or the server side runtime There are two major MEAN generators availbale , MEAN.js and MEAN.io . Both gives a kickstart  in MEAN development. But note than MEAN stack development is possible without these.  Both are theoratically same and uses same technologies and also developed by same guy, Amos Haviv . Am write down my "Getting started" experience with MEAN.js.  For MEAN.js you need these technologies installed. Node.js Git Mongodb After installing these , open a terminal and type: npm install -g grunt-cli Next Install bower npm install -g bower Next install yeomen generator npm install -g generator-meanjs ...

Save image from Flash using Node.js and Socket.io

Image
I have been working on Node.js and Actionscript 3.0 for couple of day. I have searched everywhere for help to connect socket.io and flash. But i couldn't find anything decent. Most of them where outdated. Lets' check the requiremnts Node.js Socket.io 0.6 FlashSocket FlexSdk Flash IDE Before starting i would like say something about version. Flashsocket din't work on latest socket.io and i couldn't work out any solution. And also FlashSocket need FlexSdk and also websocket .  Node js  First install socket.io in to the application directory .Note the version it's 0.9 npm install socket.io@0.9 The server code will be like this var app = require('http').createServer(handler) , io = require('socket.io').listen(app,{transports:['flashsocket', 'websocket', 'htmlfile', 'xhr-polling', 'jsonp-polling']}) , fs = require('fs'); var port = Number(81); app...

Customise Combobox/DropDown in Flash

I am always wonder how to customise the Combobox component in Flash . It's easy to change the skin. Simply double click the component , enter each movieclip and change the style. But ever wonder how to change text color and it's position. I will try to point out step by step procedure for customise it. 1. First create a class which extends ComboBox. I used  DropDownComboBox for class name. 2. Second create another class for Cell render which extends  CellRenderer. I used DropDownCellRenderer; 3. Open a new flash document  and insert a combobox component in the stage. 4. Select ComboBox clip in the library. Right click on it and select Properties.   5. In the properties panel change the default Class to the custom class you wrote . ie,  DropDownComboBox  6. Inside the DropSownComboBox constructer function type this code  dropdown.setStyle('cellRenderer', DropDownCellRenderer); 7. If you need to change the Text of ComboBox...

Squirrel and Ashoka

Image
squirrel , a set on Flickr.

How to create key hash in Windows 7 64bit

Recently i tried to get started with Facebook SDK for Android . Actually there is a good tutorials for getting started in facebook developer site. I followed this link https://developers.facebook.com/docs/getting-started/facebook-sdk-for-android/3.0/ I created a sample app in Facebook developer site and added the key hash in App setting . but When started the app i found the Facebook Authentication is working at all.I got Mobiletest is misconfigured for Facebook login. Press okay to go back to the application without connecting to facebook If you press okay it will go back to the application. And it will show an error like Login Failed: invalid_key: android key mismatch. Your key "abcdefghijklmns" Does not match tje allowed keys specified in your application Settings This is because you have entered a wrong key in Apps settings in https://developers.facebook.com/apps. After lot of googling i found that the keytool am using giving a wrong key hash. The error is...

Upload Video to Facebook Using Actionscrpt 3.0

For the last one week am searching for uploading video to Facebook using Graph Api from Flash. First challenge is to find something which will help to capture video from webcamera and convert it to ByteArray. The problem is Actionscript doesn't had any utlity to save video from webcamera. It uses Flash media server to save video. But i need something which not uses any server side acript. After searching several hours in google i found a link. http://www.zeropointnine.com/blog/updated-flv-encoder-alchem/ In this utility it uses snapshots from the webcamera which will encode it . Though it had some drawbacks and limitations, it serves my requirement for small videos. I used it for creating videos. Next i need to upload video to facebook. This is the api used to connect facebook using Actionscript. http://code.google.com/p/facebook-actionscript-api/ This API uses a different function for uploading videos to facebook . Facebook.uploadVideo(). The reason for different...