Adrian's Web Log
Adrian's second brain.
  • Home
  • IT News
  • Automotive News
  • Lifestream

code

Copy or move Magento to another instance

A quick how-to if you want to copy or move Magento to another database instance, e.g. to create a test site, or move test to live.
(1) Backup Magento using the built in backup tool. Download and uncompress the resulting SQL script. If changing the server or domain, search and replace “old.mysite.com” with “new.yoursite.com” Execute it [...]

Posted in IT | Tagged code, copy, instance, Magento, move | Leave a response

Skype Supernode Registry Hack

If you are running Skype v3 or later, there is a registry change (provided by Skype for Universities etc.) that reportedly prevents your PC becoming a supernode. I say reportedly, because whilst I have been a guinea pig for the last week I haven’t noticed being a supernode, but of course Skype may not have [...]

Posted in IT | Tagged code, skype, supernode

Sleep

Here is some DOS / NT CMD Script code to sleep for n seconds:
@echo off
echo Sleeping for 5 seconds
call :sleep 5
echo Done
goto :EOF
:sleep
:: This subroutine sleeps for n seconds
ping -n %1 127.0.0.1 > NUL 2>&1
goto :EOF

Posted in Work | Tagged code, sleep

ESC/POS control for customer display cursor

OK, so Epson’s support proved to be useless – “isn’t there a DIP switch on the back” and “we don’t do programming here” seemed to be the best they can offer.
Inspiration led me to lookup the ESC/POS sequences for cursor display – not DC2 & DC4 as previously though, they use the ASCII US (31 [...]

Posted in Reference | Tagged code, epos, esc/pos, todo

UTW performance fix

Aparently UTW suffers from an expensive query – this site has a fix:
http://ocaoimh.ie/2006/09/27/simple-utw-performance-boost/

Posted in Reference | Tagged code, done, wordpress | Leave a response

Excel code snippets for file, path and tab names in cells

From xlDynamic.com
File path, file and worksheet name:
=CELL(“filename”,A1)
File path only:
=LEFT(CELL(“filename”,A1),FIND(“[",CELL("filename",A1),1)-1)
File name only:
=MID(CELL("filename",A1),FIND("[",CELL("filename",A1),1)+1,
FIND("]“,CELL(“filename”,A1),1)-FIND(“[",CELL("filename",A1),1)-1)
The sheet name:
=MID(CELL("Filename",A1),FIND("]“,CELL(“Filename”,A1))+1,255)
Restriction: this technique only works for workbooks that have been saved at least once.

Posted in Reference | Tagged code, excel | Leave a response

Expanding (folding) category lists

I really must get around to implementing these plug-ins to stop clutter in the WordPress category and page lists.
See also here.
Consider the following JavaScript:
// Toggle Show/Hide
function toggle(name) {
if (document.getElementById(name).style.display == “block”) {
document.getElementById(name).style.display = “none”;
} else {
document.getElementById(name).style.display = “block”;
}
}

Posted in Reference | Tagged code, todo, wordpress | Leave a response

Categories

  • Food
  • IT
  • Personal
  • Play
  • Reference
  • T&C Feed
  • Uncategorized
  • Work

Tags

.htaccess 0845 0870 1and1 2.3 A1 anagram ascii auto B1 bunglaow cancel canonical centre of gravity Chickens chinese-fonts Christmas Christopher classes CMS code COG contacts-premises contract conversion dbm default defrag domain-name domesday done EAN eBay epos esc/pos excel family fasterfox google-maps internet Magento motiveAuto sap todo wordpress

Meta

  • Log in
  • Entries RSS
  • Comments RSS
  • WordPress.org

Bookmarks

  • Jonathan's Blog
  • Libby's Blog
  • NuBlue Admin
  • Train and Certify
  • Victoria's Blog

Random Tags

  • wordpress
  • sap
  • todo
  • Magento
  • code

Monthly

  • January 2010
  • December 2009
  • September 2009
  • August 2009
  • July 2009

Yearly

  • 2010
  • 2009
  • 2008
  • 2007