Archive for category Tutorial

Install Ruby On Rails 4.0.2 and RVM on Raspbian – raspberry pi

Ruby Rails is a Web application framework created in 2004 intended as a rapid development web framework that runs the Ruby programing language. The latest version of the Ruby is ‘Ruby 2.1.0‘ and was released in December 2013, it brings many new features and bug fixes. Raspberry Pi is is a credit-card-sized computer designed with the intention of promoting the teaching of basic science and programing. Therefore it a great cheap machine to setup your own Ruby on Rails server to help you start learning this great system. Read the rest of this entry »

No Comments

Install Ruby 2.1.0 and Ruby on Rails 4.0.2 on Ubuntu 12.04 LTS

Ruby Rails is a Web application framework created in 2004 intended as a rapid development web framework that runs the Ruby programing language. The latest version of the Ruby is ‘Ruby 2.1.0‘ and was released in December 2013, it brings many new features and bug fixeses. This tutorial will guide you through the installation of the latest version of ruby and rail as I’m sure you want to be working with the latest version of Ruby and RubyonRails, especially if you setting up a new server. Read the rest of this entry »

No Comments

How to add more memory to a Ubuntu Server with a Swap File

Types-of-Computer-MemoryIn linux Swapping is the process where memory is copied to the hard disk in space called swap space to free up physical memory. This is the same as virtual memory in linux. It is useful for two important reasons, First, when the system requires more memory than is physically available the kernel swaps out less used pages and gives memory to the current application (process) that needs the memory immediately. Second, a significant number of the pages used by an application during its startup phase may only be used for initialization and then never used again. The system can swap out those pages and free the memory for other applications or even for the disk cache.

There are two ways of setting up swap space in Linux, the most common is to set aside a swap partition when setting up the machine, the second is to set up a swap file. The later is useful if you didn’t set up a swap partition or if you’re using something like an Amazon EC2 micro instance that does not come pre-configured with a swap partition. Read the rest of this entry »

, , , , , , , , ,

No Comments

Ruby On Rails, dynamic table’s & add button using nested_attributes

So here’s the problem, you want to create several items that belong to one item, normally you would just the the has_many and belongs_to (OneToMany) relation in rails. Using this model you create the primary model (such as purchase order) then create several sub items (such as item) and attach them to the primary model. The problem with this is its time consuming and does not always make sense to do things this way, take the Purchase order and Items scenario, it makes much more sense to create the Purchase order and assciated Items in the same form. This is possible in rails uing nested_attributes.

Read the rest of this entry »

, , , , ,

No Comments

Installing Ruby on Rails Ubuntu 12.04 LTS using RVM and Ruby 1.9.3

Ruby Rails is a Web application framework created in 2004 intended as a rapid development web framework that runs the Ruby programing language. The latest version of the Ruby is ‘Ruby 1.9.2‘ and was realised in August 2011, it brings many new features and bug fixeses. The most signifiant changes are Block local variables, An additional lambda syntax, Per-string character encodings are supported and a new New socket API (IPv6 support). You can find a great walkthrough of all the new features at Ruby Inside. coinciding with the release of Ruby 1.9 is the Rails 3.1 framework which requires Ruby 1.8.7 or higher. RubyonRails 3.1 brings many new features, most notably: jQuery as default, HTTP Streaming, a new assets pipeline powered by Sprockets 2.0. So this is all good stuff and I’m sure you want to be working with the latest version of Ruby and RubyonRails, especially if you setting up a new server. Read the rest of this entry »

, , , , , , , , , , , ,

4 Comments

How To Install Ruby on Rails Ubuntu Server 11.10

Ruby Rails is a Web application framework created in 2004 intended as a rapid development web framework. It was intended to emphasize Convention over Configuration (CoC) meaning the developer only needs to specify unconventional aspects of the application. For example, if there is a class Sale in the model, the corresponding table in the database is called sales by default. It is only if one deviates from this convention, such as calling the table “products sold”, that the developer needs to write code regarding these names. It has also been designed around the “Don’t repeat yourself” principle. Both of these ways of thinking allow you, with Ruby Rails, to create excellent, dynamic websites very quickly. So to get started we need to setup a Ruby Rails development server on Ubuntu (Ubuntu 11.04, Ubuntu 11.10) Read the rest of this entry »

, , , , , , , , , , , , ,

1 Comment

Developing Wesbites For iPhones

So I’ve been developing a few websites mainly to be viewed on iPhones and iPods and this has raised several issues. Obviously you have to develop for mobile browsers such as safari which runs on iPhones or iPods and develop accordingly for this browser and the unique screen resolutions used on mobile devices. In this article I’m going to look at, what I feel, are the most important code snippets you’ll need to get started developing for iPhones or iPods. Read the rest of this entry »

, , , , , , , , ,

No Comments

Install and Configure a Ubuntu 11.04 Snort-MySQL Honeypot

An Intrusion Detection system is like a burglar alarm for your computer. It monitors you network and system activities for malicious activities or policy violations and reports to some kind of management station. This is great as it lets you know who were when & how people are trying to break into your network and knowing this is half the battle. You may be thinking that this isn’t enough and you want to block all hacks from happening, well most IDS systems include some “Network Intrusion Prevention” features. However the main concern should be closing up vulnerabilities rather than blocking someone already trying to hack your systems, after all it’s a bit late if they are already in your system, and this way you may accedently block innocent users.
Read the rest of this entry »

, , , , , , , , , , , , , ,

No Comments

Simple C++ IRC Bot Template

IRC Funny CartoonI searched the Internet, for quit a while, and I couldn’t find the source for a simple IRC bot in C plus plus, so I decided to write one using a TCP Stream Socket in C++. It works by setting up a simple TCP Socket to a IRC server on port 6667. The IRC Bot then assigns a NICK to the connection and connects to a IRC Channel. From here you can code you own commands and replies. I originally developed this to monitor IRC channels, however I came across a problem, PING. IRC servers periodically ping all clients to see if they are connected, so I added some more code to reply to these ping’s so that the bot stays connected. Read the rest of this entry »

, , , , , , , ,

No Comments

Installing and Configuring Nagios Ubuntu 11.04

Nagios Logo

Nagios is the Industry Standard Network Monitoring Engine. OK great so what’s that mean, well Nagios is a server that monitors your hosts and services and will inform you if something goes wrong and when it is fixed again. It can monitor network services, host resources and even network probes such as temperature and moisture.

These features as well as many more make Nagios, by far, the most complete open-source Network Monitoring tool on the market, however with all these features comes complexity and Nagios has obviously been designed with the experienced Network Administrator in mind. But don’t worry too much, its not that difficult to learn as long as you take it one step at a time, and in today’s tutorial we’re going to look at the first step, actually getting it installed Read the rest of this entry »

, , , , , , , , , ,

No Comments