XAMPP Windows 7 Mysql Problem
I’ve kept having the problem where the mysql service on xampp would start only to die after a few seconds, I fixed this by installing xampp to my D: drive, far away from any windows permissions errors [ my windows is on the C: drive ].
Hope this helps someone
SMFPacks Nibogo shoutbox edit post problem fixed
In this mod that I installed on a client’s server, all the posts in the shoutbox containing the ‘ character were uneditable, so to fix that you need to open the shoutbox.js file [you'll find it in /themes/default], go to line 463 and replace:
msg = document.getElementById("shoutbox_message").value;
with
msg = document.getElementById("shoutbox_message").value;
msg= msg.replace("'","`");
This will replace all the ‘ characters with the ` character, very unnoticeable to users but allowing you to edit at will
Linux run level 3 change font color green
The one that worked and was permanent for me in CentOS was:
settern -foreground green -background black -store
Linux:See/Change environment variables for user
To see a list of environment variables for a user, you can use the $set command without any paramteres.
This enables you to see the names of the parameters, so you can potentially edit them in the file /homedir/.bashrc.
For example, if you append to the end of the file HISTFILE=/home/userhome/.history, after the next login, [su -l username], all of username’s history will be saved to that path instead of the default [ you can see the default with set | grep HISTFILE ]
Linux: Difference between login and non-login terminals
Whats the difference between the su username and su -l username you ask?
Well, the answer for that resides in the fact that each user has a set of global environment variables [ located in /etc/profile and /etc/bashrc ] and local environment variables [ located in /userhome/.bashrc ].
When you do a non-login comand [su username], only the global env variables are read [ the ones in /etc ] and the personal ones are inherited from the previous user.
While when you do the login-shell [ su -l username], both global and local environment variables are read [for example in the local .bashrc] the user might have customized the way his prompt looks, like here: http://www.pixelshine.net/howto/linux-store-user-environment-variables/
If used without the login-console feature, changes in that file would be ommited.
Linux: Store user environment variables
If you want to change the environment variables for a specific user ( like $PS1,$PS2 and so on ), you can edit their /home/username/.bashrc files.
For example, to change the way the prompt looks, you can add this line to the ending of the file
PS1= "touch me"
Now everytime that user loggs in, his command prompt will be “touch me:” instead of the standard.
Remember, you need to use the
su -l username
command to login [ instead of the su username ] command, in order for the custom /.bashrc file located in the user’s home directory to be read and implemented.
Linux Login as different user from the same console
The propper command for doing this is:
su username
After that you will be prompted for a password
Linux: console command see what a specific parameter does
To help you from reading the entire manual looking for a specific command parameter, you can do this little trick:
man ls | grep -e '-l'
This selects only the line(s) from the manual that feature this parameter, usually making for a much fater read-through.
Gigabyte GA-MA770T-UD3 first boot freeze
When I bought my new computer, with the GA-MA770T-UD3 mainboard, I had this thing where after the first boot up, my computer would freeze after some random time interval, usually when something really important was running just to make things interesting [like starcraft or my centOS virtual machine in the middle of it doing some important linuxy stuff].
The solution I found out after some reading was that it wasnt the windows [so one windows reinstall was for nothing], but actually the problem spurs from the BIOS unit.
Now the steps I took to remedy this were as following:
- Go into BIOS [ Del right after the POST screen, with the big gigabyte logo ].
- Go into MB Inteligent Tweaker
- Change the memory clock to X8 [1600MHz]
- Reboot
This solved the problems for me after I initially updated my bios to the latest version [ but that didnt help].
If changing the memory clock doesnt help you, try updating your BIOS version to the latest version [ worked for other people ].
To do this, you can download and install the @BIOS application from gigabyte’s site [google 'download @BIOS gigabyte], then once you’re into the @BIOS, you have the option of going “Update from GIGABYTE servers” on the left, and it’s next next from there.
There’s also a BIOS app called QFlash but I prefered @BIOS because I have a stable internet connection and this way everything is done automatically [with qflash you have to know your board model,revision and download the appropriate bios update otherwise it will screw your BIOS].
If you do go gor the BIOS update, make sure you read your user manual for your motherboard before hand.
Good luck, post a comment if it helped!
Install glassfish 3 in eclipse indigo in windows 7
Hey after trying in vain to get this to work I finally found a great video explaining everything you need to know on how to do this. One thing that’s not covered is one error that seems to be pretty common for windows 7.
After watching the video, if you try to start the server and receive the following error:
‘java.io.IOException: Couldn’t get lock for C:\Program Files\glassfish-3.1.1\glassfish\domains\domain1\logs\server.log ‘
this is due to the fact that windows 7 locks access to the system files.
One solution is to turn of the UAC but I dont recommend it, so the solution I found to work is going to where your glassfish is installed, usually c:\program files\glassfish or something similar, right-click on the folder, go to properties->security and set it so that everybody has full permissions to that folder, click apply and the error should go away.
Here’s the video: