Of tyrannies

Posted on Posted in Politics

“Of all tyrannies, a tyranny sincerely exercised for the good of its victims may be the most oppressive. It would be better to live under robber barons than under omnipotent moral busybodies. The robber baron’s cruelty may sometimes sleep, his cupidity may at some point be satiated; but those who torment us for our own […]

Magento 1.x Events Reference

Posted on Posted in Magento

The following is a list of many Magento Community Edition events with module and parameters. Note that some events are dispatched with dynamically-calculated names, so this list is and always will be “incomplete”. At the bottom there is example of using an event. Magento Module Event Name Parameters Mage Admin admin_session_user_login_success array(’user’⇒$user) Mage Admin admin_session_user_login_failed […]

Magento 1.X getUrl() Function Parameters

Posted on Posted in Magento

In many, many places throughout Magento you will come across uses of getUrl() that generates a web address. It takes just two parameters but is immensely versatile. Parameter 1 – $routePath The route path follows the Zend behaviour of “module/controller/action”. The module part is self-explanatory. For example “cms” resolves to Mage_Cms. The controller is the class […]

User management in Ubuntu

Posted on Posted in Linux-Ubuntu, Programming

Show last user logins into the system lastlog | less Currently logged in users in the system who Add new user adduser username usergroupname (perl calling useradd) useradd username Delete user userdel username userdel -r username removing home directory deluser with /etc/deluser.conf (Debian and derivatives) deluser –remove-home    

Windows 10 Add better sendto functionality

Posted on Posted in Programming, Windows

Adds multiple file send to functionality Create SendToMailRecipient.vbs somewhere executable with the code below Create a shortcut link to it Put the link in the directory opened with shell:sendto Option Explicit Dim objArgs, OutApp, oNameSpace, oInbox, oEmailItem, olMailItem Dim a, oAttachments, subjectStr, olFormatHTML olMailItem = 0 olFormatHTML = 2 Set objArgs = WScript.Arguments ‘gets paths […]

Thomas Sowell Quotes

Posted on Posted in Politics

30. “The problem isn’t that Johnny can’t read. The problem isn’t even that Johnny can’t think. The problem is that Johnny doesn’t know what thinking is; he confuses it with feeling.” 29. “One of the consequences of such notions as ‘entitlements’ is that people who have contributed nothing to society feel that society owes them something, […]

Heinlein quotes

Posted on Posted in Entrepreneurship, Innovation, Politics

Throughout history, poverty is the normal condition of man. Advances which permit this norm to be exceeded — here and there, now and then — are the work of an extremely small minority, frequently despised, often condemned, and almost always opposed by all right-thinking people. Whenever this tiny minority is kept from creating, or (as […]

Magento Code Snippets

Posted on Posted in Magento

Download extension manually using pear/mage Pear for 1.4, mage for 1.5. File downloaded into /downloader/.cache/community/ ./pear download magento-community/Shipping_Agent ./mage download community Shipping_Agent Clear cache/reindex <?php // clear cache Mage::app()->removeCache(‘catalog_rules_dirty’); // reindex prices Mage::getModel(‘index/process’)->load(2)->reindexEverything(); /* 1 = Product Attributes 2 = Product Attributes 3 = Catalog URL Rewrites 4 = Product Flat Data 5 = Category […]

Inverse selection in File Explorer

Posted on Posted in Windows

Use Invert Selection for Easier File Selection in Windows Explorer The next time you need to select most of the files in an open Explorer window don’t waste your time holding down Ctrl and clicking each file manually. It’s much easier to select the ones you DON’T need, and then let Windows reverse your selection. […]