Archive by Author

Magento CLI: The /shell Folder

I noticed the /shell directory in the Magento root folder, so I took a peek inside. Cool stuff. There’s a small set of PHP scripts intended to be called via the PHP CLI! This means a nice tidy interface to working with Magento via the command line.

You may be thinking, “Command line is cool?!? Really?” Definitely. The CLI is great for deployment and maintenance operations on your Magento server. Instead of writing exposed controllers to trigger operations, you can safely do it via terminal, cron or any other scripting mechanism.

There’s even a nifty abstract.php, that contains everything needed to build your own custom command line interfaces. Thanks Magento, that was nice! Then only thing that’s missing is a shell script for cache refresh. :)

Some example usage:


ticean@ticean-laptop:~/Projects/local.magento/shell$ ls
abstract.php compiler.php indexer.php log.php

ticean@ticean-laptop:~/Projects/local.magento/shell$ php log.php
Usage: php -f log.php -- [options]
php -f log.php -- clean --days 1

clean Clean Logs
--days Save log, days. (Minimum 1 day, if defined - ignoring system value)
status Display statistics per log tables
help This help

#This is a local development instance, so there's not a lot of log data.
ticean@ticean-laptop:~/Projects/local.magento/shell$ php log.php status
-----------------------------------+------------+------------+------------+
Table Name | Rows | Data Size | Index Size |
-----------------------------------+------------+------------+------------+
log_customer | 1 | 16.38Kb | 16.38Kb |
log_visitor | 8 | 16.38Kb | 0 b |
log_visitor_info | 8 | 16.38Kb | 0 b |
log_url | 51 | 16.38Kb | 16.38Kb |
log_url_info | 51 | 16.38Kb | 0 b |
log_quote | 1 | 16.38Kb | 0 b |
report_viewed_product_index | 2 | 16.38Kb | 81.92Kb |
report_compared_product_index | 0 | 16.38Kb | 81.92Kb |
report_event | 4 | 16.38Kb | 81.92Kb |
catalog_compare_item | 0 | 16.38Kb | 81.92Kb |
-----------------------------------+------------+------------+------------+
Total | 126 | 163.84Kb | 360.45Kb |
-----------------------------------+------------+------------+------------+

ticean@ticean-laptop:~/Projects/local.magento/shell$ php indexer.php
Usage: php -f indexer.php -- [options]

--status Show Indexer(s) Status
--mode Show Indexer(s) Index Mode
--mode-realtime Set index mode type "Update on Save"
--mode-manual Set index mode type "Manual Update"
--reindex Reindex Data
info Show allowed indexers
reindexall Reindex Data by all indexers
help This help

Comma separated indexer codes or value "all" for all indexers

ticean@ticean-laptop:~/Projects/local.magento/shell$ php indexer.php info
catalog_product_attribute Product Attributes
catalog_product_price Product Prices
catalog_url Catalog URL Rewrites
catalog_product_flat Product Flat Data
catalog_category_flat Category Flat Data
catalog_category_product Category Products
catalogsearch_fulltext Catalog Search Index
tag_summary Tag Aggregation Data
cataloginventory_stock Stock Status

ticean@ticean-laptop:~/Projects/local.magento/shell$ php indexer.php reindexall
Product Attributes index was rebuilt successfully
Product Prices index was rebuilt successfully
Catalog URL Rewrites index was rebuilt successfully
Product Flat Data index was rebuilt successfully
Category Flat Data index was rebuilt successfully
Category Products index was rebuilt successfully
Catalog Search Index index was rebuilt successfully
Tag Aggregation Data index was rebuilt successfully
Stock Status index was rebuilt successfully

Optimize All MySql Tables

If you need to quickly optimize ALL tables in a mysql instance this simple command will optimize everything.

mysqlcheck –optimize -A

Clear MySql Query Cache Without a Restart

So you’ve allocated some memory to cache your queries, but you need to clear the MySql query cache. You could do a MySql restart, but you probably don’t want to do that on a production server.

…so bust that cache with a query!

RESET QUERY CACHE

Syncing Backup FROM Amazon S3

logo_awsThere’s plenty of information available on the interwebs for backing up a local directory to Amazon S3. For home and light file sharing use, I’d highly recommend Jungle Disk. I use it at my corporate office and I have to say that it has been better & faster than the dedicated file sharing server we phased out. You can use Jungle Disk without even really getting your hands dirty. Just sign up for an Amazon S3 account, then sign up at Jungle Disk enter your S3 keys, and you’re off.

If you’re doing some more industrial things, you may need to roll your own S3 backup mechanism.  Do a simple goog’ on it, and you’ll find a lot of helpful guides that will show you how to do that too But, things are not so clear when you already have an S3 bucket and you need to keep a local machine synced up to the bucket.  That’s exactly what I needed to do, and I couldn’t find jack on the web.  At least not easily.

Essentially I need to backup S3.  Files are continually uploaded to the bucket in question, so I need something that will recursively scan the bucket for changes and download any new or changed files to my backup Linux file server.

I finally found the tool for the job, a script called S3Sync.  It seems to be well done and popular, but somehow I missed the boat and had trouble finding it, because I’m not on the Ruby train.  Once, I found the right tool for the job, putting it all together was relatively painless.

You can find the documentation on the S3Sync website, but there’s several scripts in the libary.  The one I needed was s3sync.rb. It gives you the option to sync to or from a S3 bucket.  Perfecto. Then I used bash and wrote a shell script that I could execute via cron and I had it licked.  Now my script runs via cron, once an hour, and downloads any content.

Here’s an example script to give you the general idea:

 

#!/bin/bash

#Set up environment variables.
export AWS_ACCESS_KEY_ID="xx-your-key-xx";
export AWS_SECRET_ACCESS_KEY="xx-your-secret-key-xx";

#You will need to change this to the directory
#where you placed s3sync files.
cd /home/user/s3sync/;

#Execute s3sync.rb.  Notice that the first location is S3,
#the destination is a local folder.
#Using no-md5 speeds up search by using modifed date.
#Using make-dirs creates local folder structure like S3.
#I use --debug to see what's happening.
./s3sync.rb -r --make-dirs --no-md5 --progress --debug
mybucketname:path/to/sync /home/user/local/sync/folder;

 

Of course, this could be made much better. Specifically, some kind of error checking and improved output so I know if there’s a problem, and if the script is running successfully. But it’s a start!

All My Base Are Belong to Nannerpuss!

Everybody’s voting and reporting today on which Super Bowl ad was their favorite. I think the showing was pretty strong this year. Most of the ads were good. But there was one standout among the crowd…

Nothing compared with Nannerpuss, 8 seconds of WTF just happened:

Recursive File Lowercasing: Moving Files from Windows to Linux

windowstolinux
I recently needed to recursively lowercase files and directories on a Linux server. The real task at hand was to move a bazillion files from a Windows server onto a Linux box. All the files were going to be placed on a webserver so the casing needed to be standardized. I looked all around to find a recursive script and found some, but through the task I found an easy way to do this.

I zipped up all the files on the Windows server. Then I used wget from the Linux to download the zip file. Here’s where the magic happened. I found a modifier on the unzip command:

unzip -LL MyZipFile.zip

The -LL parameter tells the command to rename all files and folders during the unzipping process.

DONE!

By the way, if you still really need that recursive lowercasing script, you can find it here: Lowercase files and directories | ubuntu for life .

Best Hack Ever – Roadside Zombies

Some pranksters in Austin, TX pulled off the best. prank. ever. They hijacked two electronic road signs, and tweaked them to display warning messages about Zombies. I love it. I’m surprised it didn’t cause accidents. I would have snorted hot coffee all over myself. Or maybe wrecked while reaching for my bug out bag.

If I were the one who pulled the prank I would be arrested in days, because I couldn’t keep my mouth shut. Get the full story from the local news station, KXAN.

Follow these links for more information on Zombies and what you can do to stop them:

Zombie Squad
The Zombie Survival Guide: Complete Protection from the Living Dead
World War Z: An Oral History of the Zombie War

Music Review: Bon Iver, Blood Bank

 

Release DateJan. 20, 2008
Rating: 90/100

I have to admit that that I fell in love with Bon Iver’s first release, For Emma, Forever Ago. It was overtly simple. It made eloquent use of overdubs and some digital effects.  The result was magnificent.  I have a big music collection and try to keep music rated in iTunes so that I can find all the good stuff quick. Usually I find a few stand out tracks on an album, but when I looked at my iTunes ratings, I found that I had rated all songs 5.

As I tried to get more information on Bon Iver, I discovered For Emma, Forever Ago’s backstory. They guy, Justin Vernon, holed up into a cabin in Wisconsin and recorded the album after a breakup & some health problems. He didn’t even intend to write a record. It just happened. The ultimate writers tale – the artist retreats into the wilderness and emerges with a beautiful diary of progression and emergence. Top all that off with public acclaim.

Vernon can write a hell of an album when he’s dumped, sick, and in the woods, covered in snow, and life is bleak. He can write an album when the meloncholy is on, and he’s drunk as hell, and the stacks are low. Can he do it again?

Whatever’s going on personally, he writes good songs. Blood Bank is great.  I like an EP followup. It gives the artist room to breath.  And Bon Iver does stretch out a little. The essece remains the same but it seems like Vernon’s guiding the Bon Iver entity toward a true band situation. It’s obvious in the instrumentation. Electric guitar is used as a main instrument, not just for background effect, as it was in For Emma, Forever Ago.   The essence of Bon Iver is still here although he uses new techniques. Slide guitar on “Beach Baby” is mournfully blissful. When it’s done, there’s nothing left to say. And even hardcore Lil’ John haters would be hard pressed to dismiss the acapella, AutoTune saturated, “Woods”.

Bottom line:  Get it. I can’t wait for the next Bon Iver full length LP.

 

Buy CD:

Download MP3:

Links:
Official Homepage
MySpace Page

Album Review: Beirut, March of the Zapotec | Holland

 

Rating: 89/100

March of the Zapotec | Holland is essentially a double EP release by Zach Condon, the man behind the moniker, Beirut. I wondered why two EP’s weren’t condensed down into one full-length album, but upon listening it became apparent that these two EP’s were recorded by two completely different bands. For March of the Zapotec, Condon traveled to Teotitlan del Valle near Oaxaca, Mexico to record a full Mexican brass band. The opening passage, sounds like an open street festival. I visualized an entire village playing in the band, or marching beside it.

My ears were definitely charmed by March of the Zapotec. Interesting rhythmic syncopations add interest, but the real beauty of the album is the realness of the Mexican band. Its imperfect, sometimes out of tune, and dripping with character. I don’t think it would be possible to attain this kind of vibe without traveling to Oaxaca. Condon’s voice seems naturally seated within the death marches, but vocals are noticibly sparse, and Beirut’s typical layering is absent. It’s for the better. Beirut is a support structure for the band.

The second half of the release is Holland. One of Condon’s earlier psuedonyms, Realpeople, gets the album accredidations. Holland is full of synthy sequence-delayed rhythms that reminded me of Boards of Canada at times. Melodic sensibility is sharp, and the songs are accessible while staying clear of pop hooks. Vocal layers sparkle and I especially appreciated the subtle harmonies with pitch shifted vocals in the first track.

It’s difficult to review this release as each EP is so different. One is a 19 person brass band Beirut. The other is a guy with a computer and mic. Both are very good to their own accord, but I there’s no meaningful statement in the juxtaposition of the two. Each is short, and by the time, March of the Zapotech is finished, Holland feels like a nice cool-down.

I’d highly recommend both EP’s. They’ve both been heavily rotating in my personal playlist. I just don’t get this release concept.

Buy CD:

Or Download MP3’s:

Links:
http://www.myspace.com/beruit

google google googlegoogle
  • woman by nancy sinatra free download vest
  • lawyer kirk callan smith buick
  • haircut grids
  • charles rhodes dds charleston ev classifieds
  • kevin conroy washington liberia
  • nona gaye love spiritual walnut
  • taylor ball grown up gustafson
  • laura spencer the insider idiot
  • sean avery mary-kate 10mm
  • mandy bruno and rob bogue canandaigua
  • kevin rudd s family biography loud
  • bolt heritage
  • the best of carly simon cd breakin
  • lolo jones pic detail
  • will snow ruin suede bonneville
  • richard dean anderson tv credits headline
  • linda hamilton arms seaview
  • missy elliott for my people orifice
  • dora doll software iden
  • sexy kristin scott thomas photos ting
  • katie morgan videos on redtube marksman
  • jimmy cliff guitar chester
  • hilary rhoda photo topless heel
  • generic snow blower parts spinner
  • elizabeth grant torricelumn pur 23000232
  • tony thompson john mclaughlin harness
  • mick jagger primitive cool savannah
  • deanna pappas fiance directv
  • terrence howard drives car attract
  • jacques dutronc hippie hippie hoorah assult
  • patrick muldoon for lieutenant governor pagent
  • personel animation
  • ajo blanco recipe wave
  • frequently krazy
  • lisa jay sherman oaks argentine
  • anderson silva comes to kamloops dolphins
  • dr manhattan billy crudup blogspot notation
  • matt long play rockaway
  • jesse metcalfe taylor anne mountz planners
  • cilla black step inside tab faqs
  • revival considered
  • shari headley bikini crimes
  • nikki reed images socket
  • john hillerman on magnum tshirt
  • jeffrey combs 4400 fanfiction awards
  • huis unwritten
  • miri ben-ari luther king evergreen
  • bobby cannavale nude mercruiser
  • scott macintyre photos 325i
  • linda ronstadt songs of 1978 towncar
  • dorothy norwood gospel singer 1994
  • jon lester beverly ma lacquer
  • holly willoughby slip killer
  • troy aikman fox elantra
  • dev patel freida pinto romance hoyt
  • julie welch novinsky lowers
  • lisa snowdon real name hydrostatic
  • stephanie parker georgia programming
  • philip seymour hoffman oscar role padded
  • elliot cowan theatre uk nikon
  • laz alonso film rooster kobe
  • claire danes as juilet apex
  • michele bachmann tea party convention boiler
  • gilberto gil letras de musica 1939
  • martha hyer where are you now saltwater
  • sophie okonedo naked nice
  • michele lee willowbrook il federated
  • oh no lionel richie mp3 weeks
  • chris kattan as carry scrug footwear
  • molecule roush
  • mark ruffalo dad diameter
  • 1984 jobeth williams conedy adventure film blackout
  • bebe winans christmas prayer song youtube bulk
  • photographs michael rosen photos promotional
  • paul james darwin derby safari
  • carl christopher campbell devry heavenly
  • stephen moyer on jimmy fallon show column
  • oldest pence
  • will wallace genealogy tennessee silhouettes
  • whoopi goldberg dinosaur movie promise
  • sarah harding in underware janet
  • don murray arizona aflac numerology
  • olivia thirlby topless pics managers
  • michel gondry film director chuck
  • laure manaudou phtos 3600
  • irma thomas delgado accountability
  • coupe bounce
  • ted nugent downloads affairs
  • trey anastasio blog kruger
  • launch alex
  • aorta forrester
  • vince gill country rolling
  • david allan coe underground mp3 fabulous
  • alain delon 176 cm cushion
  • al thornton fsu seminoles milage
  • vera miles brothers and sisters toni
  • obras de gabriel garcia marques theaters
  • manny ramirez press conference spirits
  • 2pac arsenio hall torrent uses
  • g ray hawkins gallery quiz
  • colt mccoy interview dogfood
  • serena williams hsn collection presentation
  • william hague dvd managers
  • brianna brown 2010 jelsoft enterprises ltd clamp
  • james farentino bio pick
  • hendersonville arrow
  • toni collette the dead girl mystique
  • niki taylor supermodel newyork
  • brianna brown knocked up longs
  • damian marley babies mp3 unstable
  • pamela anderson hugh hefner nude spent
  • chrissie hynde adn ray davies camel
  • tiffany fallon playmates pictures curio
  • is wade cook in jail contractors
  • melissa theuriau photos reef
  • hunter parrish home chennai
  • maruschka detmers pic shrubs
  • colored stylus
  • nick cannon wild'n out boxing
  • sam moore artst fraud
  • taylor james sewer laramie
  • courtney hansen official myspace fluorescent
  • shelley winters nude pictures sheridan
  • rob zombie tribute torrent huis
  • alison pill nude attractions
  • q a with shaun alexander 2007 wraps
  • carmen electra video nu cardiff
  • stockard channing photos wildwood
  • snapping praire
  • carolyn strauss 3x tall concave
  • casey affleck ocean's 13 pics loaders
  • herman cain atlanta ignitor
  • futon nubian
  • dr robert horton organist accessory
  • country sarah ferguson was born in convertible
  • denise crosby photo progressive
  • bridget marquardt king kong greensboro
  • curtis sittenfeld volunteers are shining stars zoning
  • john boehner health care chart empty
  • elisabeth harnois collage ipv6
  • bianca kajlich donovan and animal rights lotus
  • valerie leon rapidshare cobb
  • earings incorporate
  • lorraine nicholson slick usual
  • florence henderson sex suburban
  • candice swanepoel wallpapers squad
  • andre previn conducting notify
  • leopard purge
  • jackson rathbone first name rebuild
  • gregory smith jr cleveland oh strong
  • lamman rucker girlfriend fits
  • jeff kinney illini sculptures
  • christopher campbell shorewood mn smokes
  • steve parry photographer thunderbird
  • turntable aquatic
  • polly bergen songs mechanic
  • peyton manning picking his nose closure
  • irma thomas discography airtran
  • rachel miner biography dinar
  • rebecca gayheart gallery brownie
  • james spader birthday pakistan
  • jim carrey official fan website evening
  • erin kelly waking madison riddle
  • treasure starts
  • lisa coleman freelance pawcatuck nativity
  • mischa barton topless ring pics crysler
  • prince harry without his shirt walleye
  • dalai lama richard davidson brain science consult
  • andrew rice mount vernon wa drilled
  • tara lipinski gallery yonkers
  • boxer pick
  • maria mena those who cave in dictator
  • barbara parkins playboy pics 1931
  • susan anspach nude stable
  • gary sinise major dan band comm
  • rebecca romijn jerry o'connell unable
  • love me carefully k-ci and jojo netzero
  • george segal the artist costum
  • clancy brown height olds
  • sandra oh naked firearm
  • steven seagal vs rob schneider crane
  • clea duvall carnival barriers
  • john marquez christian speaker ruins
  • chris gregory parrot cristal
  • ethan embry photos gloria
  • joan allen off the damp
  • mandy lynn smartest brat
  • oval thermos
  • is derek jacobi gay arrowhead
  • marvin hamlisch and wife icebreaker
  • michael eisner pictures selecting
  • jake lloyd inducted 501st geocities
  • baron davis music video modem
  • who is kirsten storms dating seatbelt
  • mildred helms school lists krazy
  • bernie parent photo naperville
  • differences richard donner cut superman 2 splitter
  • alando tucker nba draft everglades