1

How to build LAPP (Linux + Apache + Postgres + PHP) easy

This LAPP is to be built based on Ubuntu (or Debian or any derivative of the Ubuntu)

Install Postgresql

sudo apt-get install postgresql-8.1 php5-pgsql

Install Apache

  • The following mod-security, ldap, and odbc libraries are optional:
sudo apt-get install apache2 libapache2-mod-php5 php5-gd
sudo apt-get install libapache2-mod-security php5-ldap php5-odbc
  • Restart Apache
sudo /etc/init.d/apache2 restart




============== below are optional or if you know what to do please skip ============== 


Install other software (optional)

sudo apt-get install openssh-server unattended-upgrades
sudo apt-get install unzip zip aspell-en aspell-fr aspell-de aspell-es
sudo apt-get install curl php5-curl php5-xmlrpc
sudo apt-get install clamav-base clamav-freshclam clamav

Configure Postgres (if you know what to do please skip)

  • Create the database user 'webuser'.
sudo -u postgres createuser -D -A -P webuser
Enter in a NewDatabasePassword here, then answer 'N' to the question.
  • Create the database 'webdb' for the user 'webuser'. Enter the password that you just created.
sudo -u postgres createdb -E utf8 -O webuser webdb
  • Secure the postgresql database with an admin password.
sudo -u postgres psql template1
# ALTER USER postgres WITH PASSWORD 'NewAdminDatabasePassword';
# \q
  • Edit the file '/etc/postgresql/8.1/main/pg_hba.conf' and on line 79 change the words ident sameuser to md5.
sudo nano /etc/postgresql/8.1/main/pg_hba.conf
  • Restart the database:
sudo /etc/init.d/postgresql-8.1 restart

0

Information about Dr. Watson

Dr. Watson is a program error debugger that detects and diagnoses program errors and creates User.dmp and DrWtsn32.log files to contain the diagnostic data. In Windows NT these files are stored in the %systemroot% folder. In Windows 2000, these files are stored in the %systemdrive%\Documents and Settings\All Users\Documents\DrWatson folder. For Windows XP, these files are stored in the %systemdrive%\Documents and Settings\All Users\Application Data\Microsoft\Dr Watson folder. The DrWtsn32.log file is appended each time a program error occurs; the User.dmp file is overwritten each time.

To turn off the Dr Watson debugger, apply the following Windows NT / Windows 2000 / Windows XP registry hack:
Hive: HKEY_LOCAL_MACHINE
Key: SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug
Name: Auto
Type: REG_DWORD
Value: 0 disable
Value: 1 enable

To re-enable Dr Watson, you can change Auto back to 1 or from the command line type drwtsn -i.
To change the folder for log files, apply the following Windows NT / Windows 2000 / Windows XP registry hack:
Hive: HKEY_LOCAL_MACHINE
Key: SOFTWARE\Microsoft\DrWatson
Name: LogFilePath
Type: REG_SZ

This is the registry key containing most of the values for Dr Watson including AppendToLogFile, CrashDumpFile (change from default name user.dmp), CreateCrashDump, MaximumCrashes, SoundNotification, VisualNotification, and Wavefile.
The AppendToLogFile value controls whether Dr. Watson creates a new log file or appends data to the old log file for each application error that occurs:
Hive: HKEY_LOCAL_MACHINE
Key: SOFTWARE\Microsoft\DrWatson
Name: AppendToLogFile
Type: REG_DWORD
Value: 0 new
Value: 1 append

The CrashDumpFile value controls the path and filename to use when creating a crash dump file :
Hive: HKEY_LOCAL_MACHINE
Key: SOFTWARE\Microsoft\DrWatson
Name: CrashDumpFile
Type: REG_EXPAND_SZ 
 
The CreateCrashDump value controls whether Dr. Watson creates a crash dump file after an application crash has occured :
Hive: HKEY_LOCAL_MACHINE
Key: SOFTWARE\Microsoft\DrWatson
Name: CreateCrashDump
Type: REG_DWORD
Value: 0 disable
Value: 1 enable

The DumpAllThreads value controls whether Dr. Watson should dump the contents of all threads during an application error :
Hive: HKEY_LOCAL_MACHINE
Key: SOFTWARE\Microsoft\DrWatson
Name: DumpAllThreads
Type: REG_DWORD
Value: 0 disable
Value: 1 enable

The DumpSymbols value controls whether Dr. Watson should dump the contents of the symbol tables during an application error :
Hive: HKEY_LOCAL_MACHINE
Key: SOFTWARE\Microsoft\DrWatson
Name: DumpSymbols
Type: REG_DWORD
Value: 0 disable
Value: 1 enable
The SoundNotification value controls whether Dr. Watson plays a wav file when an application error occurs :
Hive: HKEY_LOCAL_MACHINE
Key: SOFTWARE\Microsoft\DrWatson
Name: SoundNotification
Type: REG_DWORD
Value: 0 disable
Value: 1 enable

The WaveFile value specifies the path and filename of the wave file to be played during an application error :
Hive: HKEY_LOCAL_MACHINE
Key: SOFTWARE\Microsoft\DrWatson
Name: SoundNotification
Type: REG_EXPAND_SZ 
 
The VisualNotification value controls whether Dr. Watson displays a popup message box when it encounters an application error :
Hive: HKEY_LOCAL_MACHINE
Key: SOFTWARE\Microsoft\DrWatson
Name: VisualNotification
Type: REG_DWORD
Value: 0 disable
Value: 1 enable


There are various debugger utilities besides Dr Watson. Lotus Notes replaces Dr Watson with its debugger. To switch back to Dr Watson, should another debugger be enabled, apply the following Windows NT / Windows 2000 registry hack:
Hive: HKEY_LOCAL_MACHINE
Key: SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug
Name: Debugger
Type: REG_SZ
Value: drwtsn32 -p %ld -e %ld -g

0

Android: Restore contacts and sms data from data.img files

Contacts and sms data store in the path below:

data\com.android.providers.contacts
data\com.android.providers.telephony


But before that you need to extract data.img (Nandroid image):

Use unyaffs.exe in a Windows environment  with the format below:
unyaffs  image_file_name

Then you will get your data.img file extracted. Find your data from the above path and restore them to the same path of your phone system, then reboot to get your data reloaded.

0

Best overall compression program



Position Program #1st pos #2nd pos #3th pos #4th pos #5th pos #6th pos #7th pos #8th pos Points
01PAQ8PX6220000088
02WinRK 3.1.24410100082
03PAQAR 4.50133200049
04NanoZip 0.08a0012123133
05DURILCA 0.50110401032
06SLIM 0.23d0002101218
07STUFFIT 140200000016
08ZPAQ 2.050000121113
09LPAQ80010011112
10PPMonstr J rev.10000030110
11RKC 1.02000100027
12EPM r9000001105
13Ocamyd 1.66test1000000204

- Scoring similar to Formula 1 2003 system:
  1st place, 10 points;  2nd place, 8 points
  3th place, 6 points ;  4th place, 5 points
  5th place, 4 points ;  6th place, 3 points
  7th place, 2 points ;  8th place, 1 point
- Only programs with at least 2 top8 scores will be listed.
- If two programs have the same amount of points the program with the most 1st places (2nd places etc) will be regarded the better program.

0

How to remove saved Credentials (passwords) from Windows

Have you ever tried accessing a network device or resource only to find that last time you accessed that resource, you used a username and password that no longer works, or does not have the proper access.
This usually happens when you use credentials other than yours to access a resource on your network, or to access a resource on someone else's network, and you check the "Remember my password" check box.

Ok, so you want to remove that password, but how. Simple, just follow these simple instructions to see all the passwords you've cached on your machine:

To removed cached credentials

1. Click Start and select Run
2. In the Open field type "rundll32.exe keymgr.dll, KRShowKeyMgr"
3. Once the Stored Usernames and Passwords interface opens you can select any of the entries and select Properties to view the existing information
4. To remove a saved password you can select one of the entries and select Remove. A confirmation screen will appear. Click on OK and the account will be removed
5. You can add additional saved passwords as well by clicking on the Add button and entering the appropriate information
6. Repeat the steps above as needed to add, remove or edit saved passwords
7. When you are done using the interface click the Close button
That's all there is to it. This is a great way to see if, while working on a machine, you've accidentally saved your credentials, as any username/password combinations in this list will survive a reboot, and still be available.



0

How to remove network drive from registry

First and foremost, back up your registry!! Then open regedit and search for Mountpoint key in the \HKEY)CURRENT_USER\Software\Microsoft\windows\CurrentVersion\Explorer folder find the share you need removed and delete it.

The registry key for my share was like this ##server#share and after i deleted and restart i could connect to the share no problem

0

How to install fonts in Linux – Ubuntu, Debian

How to install fonts in Linux – Ubuntu, Debian

Ubuntu Linux searches for fonts in specific locations as listed in the /etc/fonts/fonts.conf file.
A look at the contents of /etc/fonts/fonts.conf file indicates the following directories which are searched by Ubuntu Linux for fonts. They are :
  1. /usr/share/fonts
  2. /usr/share/X11/fonts
  3. /usr/local/share/fonts
  4. ~/.fonts
So if you want to install new fonts in Ubuntu Linux or Debian for that matter, you can copy the fonts to any one of the 4 directories listed above.

The last directory ~/.fonts is a local hidden directory in every user’s  Home folder. If you install the new fonts in this directory, the fonts will be available only for the person logged into that particular user account.

If you want your new fonts to be available system wide, to all users, then you should install them in any one of the first three directories listed above.

Once all your fonts are copied to the specific font directories, you have to make Ubuntu Linux aware of the new fonts so that it can make use of them. This is done by running the following command in the console :

$ sudo fc-cache -f -v
 
Please note that you have to have super user powers to run this command. In Debian Linux, it means you have to be logged in as root user.

What the fc-cache command does is, it reads and caches all the fonts installed in the font directories. You have to run this command each time you install any new fonts in Linux.

0

How to mount an USB drive maually so everyone can read/write to it?

Not only the umask=1000 but also users (plural) for more than one user and rw (read/write).

Read the man pages for umask, mount, fstab and this Quick and Dirty Guide to Linux File Permissions

In /etc/fstab:
Code:
/dev/sda1        /mnt/flash       vfat        users,umask=1000,rw,noauto 0   0

Then run:
mount /mnt/flash