Firefox/flash has no sound in Ubuntu 9.10

February 2nd, 2010

Just remove ./pulse from your home folder and close/open Firefox.

Installing and Running RubyOnRails on Ubuntu

December 10th, 2009

sudo apt-get install ruby-full build-essential

or

sudo aptitude install ruby build-essential libopenssl-ruby ruby1.8-dev

sudo apt-get install rubygems

echo “export PATH=/var/lib/gems/1.8/bin:$PATH” >> ~/.bashrc

sudo gem update –system

INSTALLING Rails

sudo gem install rails

or

apt-get install rails (installing rails with gem is preferred)

sudo aptitude install libfcgi-dev

RUNNING RubyOnRails

rails /home/myuser/www/mynewapp -d mysql (-D if you installed rails with apt)

$cd /home/myuser/www/mynewapp
$ruby script/server

Hardening TPC/IP in linux

November 20th, 2009

Execute the following:

sysctl -w net.ipv4.icmp_echo_ignore_broadcasts=1
sysctl -w net.ipv4.conf.all.accept_redirects=0
sysctl -w net.ipv6.conf.all.accept_redirects=0
sysctl -w net.ipv4.conf.all.send_redirects=0
sysctl -w net.ipv6.conf.all.send_redirects=0
sysctl -w net.ipv4.conf.all.accept_source_route=0
sysctl -w net.ipv4.conf.all.forwarding=0
sysctl -w net.ipv4.conf.all.rp_filter=1
sysctl -w net.ipv4.tcp_max_syn_backlog=1280
sysctl -w net.ipv4.tcp_syncookies=1
sysctl -w net.ipv4.conf.all.log_martians=1
sysctl -w net.ipv4.conf.all.mc_forwarding=0

To make it permanent, put the same line above minus the “sysctl -w ” command  in /etc/sysctl.conf

net.ipv4.icmp_echo_ignore_broadcasts=1
net.ipv4.conf.all.accept_source_route=0
net.ipv4.conf.all.mc_forwarding=0
net.ipv4.conf.all.rp_filter=1
net.ipv4.tcp_max_syn_backlog=1280
net.ipv4.tcp_syncookies=1
net.ipv4.conf.all.accept_redirects=0
net.ipv6.conf.all.accept_redirects=0
net.ipv4.conf.all.send_redirects=0

Useful commands for displaying Network Services/Connections

November 20th, 2009

#netstat -an|awk ‘/tcp/ {print $6}’|sort| uniq -c

#netstat -anp

#lsof|grep LISTEN

Change Wordpress URL via MySQL

June 24th, 2009

UPDATE wp_options SET option_value = replace(option_value, ‘http://localhost/mis’, ‘http://www.ubaguio.edu/mis’) WHERE option_name = ‘home’ OR option_name = ’siteurl’;

Killing network connections from the MS Windows command line

June 18th, 2009

1. Show active connections using netstat:

>netstat -anb

2. Kill connection based on process ID.

>taskkill /pid <pid>

LToT+eLDI, a perfect combination

April 7th, 2009

Last year, I was fortunate enough to have participated in two international workshops. One was entitled,” eLDI – eLearning
Development and Implementation,” sponsored by the Federal Ministry for Economic Cooperation and Development (BMZ) on behalf of the Government of the Federal Republic of Germany, implemented and supported by common sense through Inwent. The other was, “IOSN-INWENT LINUX TRAINING OF TRAINERS (LToT),” presented by the ASEAN+3 Node of the International Open Source Network and Inwent Capacity Building International, Germany in cooperation with the Information Technology Center of the National University of Laos.

LToT participants
LToT participants

The eLDI workshop started from May 24, 2008 until February 6, 2009 with a total of 300 hours,  which includes 100 hours face to face and 200 hours online. The program consists of the following basic modules: Instructional Design, Content Development, Interactivitym eLearning Technology, eLearning Management, Tutoring and Support of Virtual Learning Communities. Both face to face workshops were held in the UPOU campus, in Laguna, Philippines.

eldi
eLDI participants

The LtoT workshop was held at the Information Techonology Center of the National University of Laos in Vientiane Capital, Lao PDR from the 8th to the 19th of September 2008. The workshop was for preapringparticipants for the Linux Professional Institute Certification Level 1 (LPIC-1).  The first week covered topics on LPI 101 which are the following: Hardware and Architecture; Linux Installation and Package Management; GNU and Unix Commands; Devices; Linux Filesystems; Filesystem Hierarchy Standard; and The X Window System. The second week covered topics on LPI 102 which are the following: Kernel; Boot, Initialization, Shutdown and Runlevels; Printing; Documentation; Shells, Scripting, Programming and Compiling; Administrative Tasks; Networking Fundamentals; Networking Services;  and Security.

With the knowledge and skills I have gained from both seminars, I was able to incorporate LPI topics with my courses in a blended learning approach. Recently, I also conducted a workshop on distance learningand will hold another one this April 2009 followed by another on LPI and open source solutions.  Since I got certified with LPIC-1, there
has  been a steady demand from our students and faculty for me to hold seminars on Linux and FOSS.

Now, I’m busier and happier than ever!

moodle upgrade – database needs to be stored in utf-8

March 3rd, 2009

While I was upgrading moodle, I got this message:

It is required that you store all your data in Unicode format (UTF-8). New installations must be performed into databases that have their default character set as Unicode. If you are upgrading, you should perform the UTF-8 migration process (see the Admin page).

After googling around, I was able to get this solution:

1. Create a dump of your old database.

> mysqldump -uUSER -p OLD_DATABASE > OLD_DATABASE.sql

2. Create a new database. This is where you will transfer the old one.

mysql> create database NEW_DATABASE default charset=utf8;

mysql> grant all privileges on NEW_DATASE to ‘USER’@'localhost’;

3. Load your old database to the new one.

>mysql -uUSER -p NEW_DATABASE < OLD_DATABASE.sql

TCPView

February 17th, 2009

TCPView is a tool from Microsoft that lets you view what process owns what port. You can download it for free from http://technet.microsoft.com/en-us/sysinternals/bb897437.aspx

grep on windows?

February 17th, 2009

I was just fiddling on the Windows command prompt and much to my surprise that I can use “find” like how I use “grep” on Linux. For example, you want to filter lines that have the word LISTEN, just enter the command(s) below:

> netstat -an|find “LISTEN”