Using Drush on a Shared Hosting Account

September 8th, 2013

This gets you the latest version of PHP that Hostgator provides with the latest version of Drush that will run on PHP 5.3.27.  Newer versions of Drush require 5.3.3 or newer, but this is better than nothing.  This is probably the same on any host that isn’t up to date and runs a cPanel solution.

  1. First off, download Drush 5.x from GitHub and unzip it to ~/drush (https://github.com/drush-ops/drush/tree/5
    1. wget https://github.com/drush-ops/drush/archive/5.x.zip
    2. unzip 5.x
    3. mv drush-5.x drush
  2. Edit your ~/.bashrc file and add:
    1. vi ~/.bashrc
    2. alias drush=”~/drush/drush”
    3. alias php=”/opt/php53/bin/php”
    4. Esc : wq Enter
  3. Refresh your current session so these new rules can take effect:
    1. source ~./bashrc
  4. To verify PHP is running version 5.3 or newer, from the command line type:
    1. php -v
  5. To verify Drush is running, run:
    1. drush st
  6. If your output is like the following, success!
    1. PHP configuration : /usr/local/lib/php.ini
      Drush version : 5.0-dev
      Drush configuration :

List GIT Failed Automatic Merge Files Only

March 29th, 2012

If you just did a merge in GIT and had some automatic merge failures, you can use git status -s to see all updates with unmerged errors marked as U or you can run the following command and just show those files that failed on merge.

git diff --name-status --diff-filter=U

Sencha Touch v1 Open Links in New Windows

March 27th, 2012

Just add this snippet to your code if you want to force all links in your panels to open in a new window.   I’m targeting links specifically, but you could use it on just about anything.

Ext.override(Ext.Panel, {
  listeners : {
    click: {
      element: 'el',
      fn: function (e) {
        if (e.target.tagName === 'A') {
          e.stopEvent();
          window.open(e.target.href);
        }
      }
    }
  }
});

Fix for Sencha Touch Rounded Corners Bug in v1.0-1.1.1

December 30th, 2011

Some rounded corners in Sencha Touch forms with fieldsets look like garbage by default.  Here’s a CSS only fix:

.x-form-fieldset .x-field:first-child.x-label-align-top .x-field-text,
.x-form-fieldset .x-field:first-child.x-label-align-top .x-input-text,
.x-form-fieldset .x-field:first-child.x-label-align-top .x-input,
.x-form-fieldset .x-field:first-child.x-label-align-top .x-input-number,
.x-form-fieldset .x-field:first-child.x-label-align-top .x-spinner-body,
.x-form-fieldset .x-field:first-child.x-label-align-top .x-input-radio,
.x-form-fieldset .x-field:first-child.x-label-align-top .x-input-checkbox,
.x-form-fieldset .x-field:first-child.x-label-align-top .x-input-email,
.x-form-fieldset .x-field:first-child.x-label-align-top .x-input-url,
.x-form-fieldset .x-field:first-child.x-label-align-top .x-input-password,
.x-form-fieldset .x-field:first-child.x-label-align-top .x-input-slider {
  -webkit-border-top-left-radius: 0;
  border-top-left-radius: 0;
  -webkit-border-top-right-radius: 0;
  border-top-right-radius: 0;
}

 

Thank you: http://www.sencha.com/forum/showthread.php?152265-CSS-bugs-with-fieldsets-and-labelAlign-top

Count Number of Lines of Code in a Project

December 20th, 2011

find ./ -name \*.js | xargs wc

[find] [in this current directory] [files named] ["wildcard".js] [and] [just print counts]

The first column is the number of lines for the listed file, with the total count at the bottom.  As you can tell, I’m working on a JavaScript project.



©2005-2014 Blog – Epiphany Digital is proudly powered by Badgers and Web Design is by Epiphany Digital
Entries (RSS) and Comments (RSS). 28 queries. 0.359 seconds.

Thank you for visiting this site. The web fairy will visit you in your sleep... you know, I was going somewhere with this, but it really doesn't have as much innocent charm as the tooth fairy, especially when I picture the web fairy as someone much like the Simpsons' Comic Book Guy but with wings. It's just not something I want.