Dual monitors issue

1 Comment »

I was having trouble with dual monitors and “Make default” button.
Thanks to http://www.thetechrepo.com/main-articles/502-how-to-change-the-primary-monitor-in-ubuntu-or-other-linux-distributions
Short code: xrandr –output HDMI2 –primary


Ubuntu and Apple Keyboard

No Comments »

Fix apple keyboard functional buttons.
Add this line to start up script /etc/rc.local

sudo nano /etc/rc.local

echo 2 > /sys/module/hid_apple/parameters/fnmode


Ubuntu notify about work timeout

No Comments »

As a non smoker i need to rest my eyes once in an hour. So here is a method to remind me, that the time has come :)

You will need
Notification library for ubuntu

sudo apt-get install libnotify-bin

And a script is, to run every 10th minute of an hour:

timeout.sh

#!/bin/bash
if [ $(date +%M) = '10' ]; then
	DISPLAY=:0.0 notify-send "It's timeout time!"
fi

Crontab to run every min.

crontab -e

Add this line

* * * * * sh /home/user/timeout.sh

P.S.
Yes I know I can do that totally within crontab. Its just for purpose i would think of more logic, i decided to make it seperate sh script


Facebook oAuth adapter for Zend Framework

4 Comments »

Check this out.
I am releasing Zend_Auth_Adapter_Facebook on github

http://github.com/fordnox/Zend_Auth_Adapter_Facebook


Hide password with jQuery

No Comments »
Simple javascript to toggle password visibility Your HTML structure nneded for this to work is as simple as:
my_secret_password
Add javascript
$(function() {
/**
* Hide password with bulets and make it toggle
*/
$("div.password").contents().wrap('<span class="pass" />');
$('span.pass').before('<span class="bullets">&bull;&bull;&bull;&bull;</span>').hide();
$("div.password").click(function(){
$('span.pass',this).toggle();
$('span.bullets',this).toggle();
});
});
And the result is:
my_secret_password

Payment Gateways Sandboxes

No Comments »

PayPal:

Both for buyer and seller https://developer.paypal.com

Authorize.net

For seller: http://developer.authorize.net/testaccount/

Google Checkout:

For buyer: https://sandbox.google.com/checkout For seller https://sandbox.google.com/checkout/sell

2Checkout:

http://developers.2checkout.com/

Default Zend Framework Layout

No Comments »
< ?php echo $this->doctype() ?>
<html>
<head>
    < ?php echo $this->headTitle() ?>
    < ?php echo $this->headLink() ?>
    < ?php echo $this->headStyle() ?>
</head>
<body>
    < ?php echo $this->layout()->content ?>
    < ?php echo $this->headScript() ?>
</body>
</html>


Ubuntu notify message

No Comments »
Little useful Ubuntu terminal command:
notify-send "Computer Says" "Hi"

Php Under Control on Ubuntu

1 Comment »
Install Java
sudo apt-get install sun-java6-jre sun-java6-plugin sun-java6-fonts
Test Java
java -version
Create SymLink
sudo ln -s /usr/bin/java /bin/java
Install Cruise Control
cd /opt
Download Cruise Control binary files at
http://sourceforge.net/projects/cruisecontrol/files/CruiseControl/2.8.2/
or directly
sudo wget http://mesh.dl.sourceforge.net/project/cruisecontrol/CruiseControl/2.8.2/cruisecontrol-bin-2.8.2.zip
Unzip Cruise Control
sudo unzip cruisecontrol-bin-2.8.2.zip -d /opt
Create SymLink
sudo ln -s /opt/cruisecontrol-bin-2.8.2 /opt/cruisecontrol
Start CruiseControl
/opt/cruisecontrol/cruisecontrol.sh
The output should something like this be like this ...
[cc]Dec-15 19:58:50 Project       - Project connectfour:  next build in 5 minutes
[cc]Dec-15 19:58:50 Project       - Project connectfour:  waiting for next time to build
Get PhpUnderControl
svn co svn://svn.phpunit.de/phpunit/phpUnderControl/trunk /opt/phpUnderControl
Patch Cruise Control
/opt/phpUnderControl/bin/phpuc.php install /opt/cruisecontrol
Read next to start cruising your project http://phpundercontrol.org/documentation/getting-started.html

No video on Ubuntu with dual monitors

4 Comments »
I had trouble with my Dual monitors and video. No matter what player i usede it just showed black screen. So the solution is: Alt +F2 enter:
gstreamer-properties
Then Video tab > Output and choose
X Windows System (No Xv)
Restart and give a try to video player.