Posts

Showing posts from April, 2011

mysql repair table

Drupal Error : Table 'watchdog' is marked as crashed and should be repaired in /includes/database.mysqli.inc SQL query: REPAIR TABLE `watchdog` Or from phpMyAdmin : 1. Login to phpMyAdmin 2. Choose the affected database. If you only have one database, it should choose it by default so you don't need to do anything. 3. In the main panel, you should see a list of your database tables. Check the boxes by the tables that need repair. 4. At the bottom of the window just below the list of tables, there is a drop down menu. Choose "Repair Table"

drupal 6x - moving back from image cck to userpic

If you ever used image cck for user pictures and need to move back to the default built-in user pictures functionality, use this to migrate your data update users u, content_type_profile c, node n, files f set u.picture = f.filepath where f.fid=c.field_profpic_fid and c.nid = n.nid and n.uid = u.uid

Android power user codes

*#*#4636#*#* This code shows following 4 menus on screen: Phone information Battery information Battery history Usage statistics *#*#7594#*#* This code can be used to change the "End Call / Power" button action in your phone. *#*#273283*255*663282*#*#* This code opens a File copy screen where you can backup your media files e.g. Images, Sound, Video and Voice memo. *#*#197328640#*#* This code can be used to enter into Service mode. You can run various tests and change settings in the service mode. WLAN, GPS and Bluetooth Test Codes: *#*#232339#*#* OR *#*#526#*#* OR *#*#528#*#* - WLAN test (Use "Menu" button to start various tests) *#*#232338#*#* - Shows WiFi MAC address *#*#1472365#*#* - GPS test *#*#1575#*#* - Another GPS test *#*#232331#*#* - Bluetooth test *#*#232337#*# - Shows Bluetooth device address *#*#8255#*#* This code can be used to launch GTalk Service Monitor. Codes to get Firmware version information: *#*#4986*2650468#*#* - P

Split and then join a file on linux - for email backup etc

On OSX terminal ssh to centos Split: split -b 25000000 -d httpdocs.tar.gz httpdocsgz (gmail does not accept attachments over 25M) Mail: echo "site backup" | mutt -s "site backup0" -a httpdocsgz00 xyz@gmail.com echo "site backup" | mutt -s "site backup0" -a httpdocsgz01 xyz@gmail.com etc Join back: cat httpdocsgz* > httpdocs.tar.gz (after downloading)

rename files with a wildcard in OSX terminal

Windows: ren *.cbr *.rar OSX: for FILE in *.cbr;do mv "${FILE}" "${FILE%.cbr}.rar";done

centos linux plesk db user add error

You may receive a “Table ‘mysql.servers’ doesn’t exist” error message while adding a database user in Plesk OR while restarting the Mysql service. The complete error message look like: Error: Connection to the database server has failed: Table 'mysql.servers' doesn't exist solution: [root@server ~]# mysql_fix_privilege_tables --user=admin --password= --verbose Link1 Link2

Mac OSX Bootcamp time fix using RealTimeIsUniversal

Link: 1. Boot Windows 2. Click Start --> Run and type regedit. Click OK 3. The Windows Registry Editor should pop up. Navigate within the explorer to: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation 4. Click on the TimeZoneInformation "folder" from the navigation pane if you haven't already done so. 5. This assumes the correct key doesn't exist. If it does, you will just change the existing key's value: Right click on the white space within the folder (If you don't have a right mouse button, you may need to download a program called applemouse to emulate the "control-click" of the apple 1-button mouse). Select new --> DWORD Value. Title the key "RealTimeIsUniversal" (No quotes). Set the value to "1" (No quotes again). Hexidecimal should be fine. 6. Either reboot and set the clock in MacOS or set the clock in Windows. You should now be able to reboot into either OS and have a correct clock