You have to keep busy
Make a list of the things that trigger your desire, such as your computer or any porn you have lying around the house.
Get rid of whatever stuff that triggers you that you can. You probably can't justify throwing the computer away, but you can get rid of DVDs and stored files and magazines, etc. If you can get rid of the entry point to the masturbation behavior chain, you can stop falling down that chain some of the time.
With regard to the computer, you can install "nanny" software made to block access to pornographic websites if you want to. The computer will still function as an entry point to the masturbation behavior chain for a while, but if you are blocked (and can resist the temptation to uninstall the software), this will interrupt the chain's progress towards masturbation, giving you some time to divert yourself.
Develop a plan of acceptable alternative or substitute behaviors you can engage in when you notice that you are starting to crave. Let your partner know you have needs if that is an option. Or go out for a jog or take the proverbial "cold shower". These things essentially help you to change your environment so as to interrupt and disorient the chain from progressing.