Wyświetlanie postów z listopad, 2009

Adobe AiR SDK linux ubuntu config

Copy and replace air sdk to flex sdk
Fix air sdk runtimes:
[code lang="shell"]
rm FLEX_SDK/runtimes/air/mac
ln -s FLEX_SDK/runtimes/air/mac FLEX_SDK/runtimes/air/linux

Adobe AiR update

main Application:
[code lang="xml"]
<?xml version="1.0" encoding="utf-8"?>
<mx:WindowedApplication xmlns:mx="" layout="absolute" initialize="checkForAppUpdate()">
import air.update.ApplicationUpdaterUI;

private var appUpdater:ApplicationUpdaterUI = new ApplicationUpdaterUI;

// checks to see if an updated version of the app is up.

private function checkForAppUpdate():void
appUpdater.configurationFile = new File(app:/updateConfig.xml);
appUpdater.isCheckForUpdateVisible = false;
appUpdater.addEventListener(UpdateEvent.INITIALIZED, onUpdate);
appUpdater.addEventListener(ErrorEvent.ERROR, onError);


// if ther…

Percellite Ubuntu Clipboard Manager

[code lang="shell"]
sudo apt-get install percellite

ctrl + c
ctrl + alt + H
ctrl + v

Apt-mirror setup local ubuntu package repository

Server setup
[code lang="shell"]
sudo apt-get install apache2
sudo apt-get install apt-mirror
sudo vim /etc/apt/mirror.list
deb karmic main restricted universe multiverse
deb karmic-security main restricted universe multiverse
deb karmic-updates main restricted universe multiverse
sudo apt-mirror
sudo vim /etc/cron.d/apt-mirror
0 4 * * * apt-mirror /usr/bin/apt-mirror > /var/spool/apt-mirror/var/cron.log
#daily 04:00 AM
sudo ln -s /var/spool/apt-mirror/mirror/ /var/www/ubuntu
Client setup
[code lang="shell"]
sudo vim /etc/apt/source.list
deb karmic main restricted universe multiverse
deb karmic-updates main restricted universe multiverse
deb karmic-security main restricted universe multiverse
sudo links

Ssh remove server name

Remove server name from local secure ssh list.
[code lang="shell"]
ssh-keygen -R

OpenVPN config setup

[code lang="shell"]
openvpn --config VPN.conf

Ssh copy public key

Copy public ssh key to user@host
[code lang="shell"]
ssh-copu-id -i login@host

NFS Server Client Tutorial

NFS Server
Install NFS Server Support
[code lang="shell"]
sudo apt-get install nfs-kernel-server nfs-common portmap
Editing /etc/exports
[code lang="shell"]
sudo vim /etc/exports
sudo /etc/init.d/nfs-kernel-server restart
sudo exportfs -a
NFS client
Install NFS client support
[code lang="shell"]
sudo apt-get install portmap nfs-common
sudo mount /files
sudo /etc/init.d/portmap restart
sudo /etc/init.d/nfs-common restart
Mounting at boot using /etc/fstab
[code lang="shell"]
sudo vim /etc/fstab /files nfs rsize=8192,wsize=8192,timeo=14,intr

Tomcat 6 Ubuntu install for multiple instances

[code lang="shell"]
root@h apt-get install sun-java6-jdk
Install TOMCAT6 user instances
[code lang="shell"]
root@h: apt-get install tomcat6-user
Add new user:
[code lang="shell"]
root@h: adduser tomcatA
Create TOMCAT6 user instance:
[code lang="shell"]
tomcatA@h: tomcat6-instance-create tomcat
Tomcat configure(port):
[code lang="shell"]
tomcatA@h: vim tomcat/conf/server.xml
Tomcat start/stop:
[code lang="shell"]
tomcatA@h: ./tomcat/bin/
tomcatA@h: ./tomcat/bin/
Add to autostart:
[code lang="shell"]
root@h: vim /etc/init.d/tomcatA
# Tomcat auto-start
# description: Auto-starts tomcat
# processname: tomcat
# pidfile: /var/run/

export JAVA_HOME=/usr/lib/jvm/java-6-sun

case $1 in
sudo -u tomcatA /home/tomcatA/tomcat/bin/
sudo -u tomcatA /home/tomcatA/tomcat/bin/s…

Git: SVN -> Git

Monitoring: Cacti

Monitoring: Nagios

Monitoring: Munin

Eclipse Maven Plugin m2eclipse

Eclipse Update and Add-ons site:

Scala IDE in Eclipse

How to configure Scala IDE in Eclipse

Download Eclipse:
Add Software Updates and Add-ons location:
Install: Scala IDE plugin

Tar tutorial

Create, Extract, See Contents
The tar program takes one of three funcion command line arguments (there are two others I won't talk about).

c - to create a tar file, writing the file starts at the beginning.
t - table of contents, see the names of all files or those specified in other command line arguments.
x - extract (restore) the contents of the tar file.

Compression, Verbose, File specified
In addition to a function command line argument the arguments below are useful. I usually use z and f all the time, and v when creating/extracting.

f --- specifies the filename (which follows the f) used to tar into or to tar out from; see the examples below.
z --- use zip/gzip to compress the tar file or to read from a compressed tar file.
v --- verbose output, show, e.g., during create or extract, the files being stored into or restored from the tar file.

To tar all .cc and .h files into a tar file named foo.tgz use:

[code lang="shell"]
tar cvzf foo.tgz *.cc *.h

To s…