Blogs

Pushing to a READ-ONLY GIT Repo - yes you can!

We're using BitBucket to host some private repos for clients lately.  This is a great approach for small teams, you can get private repos for FREE, but your team size is limited to 6 team members I think.  

The Setup

So setting up remotes on your website server is easy, you add the SSH remote to be able to do pull requests from the repo:

git remote add git@bitbucket.org:your-account/your-repo-name.git

All fine and good, but what *IF* you want to actually PUSH some changes from this branch?  Trying the following push request:

Drupal Object Log

Drupal Modules: 

Over the past few months I have been writing array object to watchdog as messages.  This is pretty handly for seeing LOTS of variable arrays in some sort of order.  Here's a snippet from Dropbucket where I got the idea:

watchdog("my_module", '<pre>' . print_r( $my_array_or_object, true) . '</pre>');

This approach might be OK on your local dev environment, but you do NOT want to do this on your live site!  All those messages become translatable strings, and get piled up in the translation table.  That becomes a big mess quick.  

Debugging LESS

I'm working on a Drupal project that is using LESS instead of SASS for CSS compiling.  To get the job done, I am using Node.js to compile the LESS files locally. All fine and good, but what about actively building a site - writing, reviewing and confirming LESS changes and eventually CSS changes on the site.  

BIG TROUBLES!  The CSS compiler does a good job of creating a SINGLE CSS file out of the neatly organized fleet of LESS files I am using.  

Ruby, Sass and Compass in Ubuntu 14/04 the right way with RBENV and Bundler

Last time around, we installed Ruby and gems from the command line in Ubuntu.  That approach turns out to be unmanageable when you have multiple projects which all require multiple versions of Gems.  Here's how to get it right with RBENV and Bundler, which manage your Ruby and Gem installs.  

Prep

First, get your machine straight by uninstalling Ruby, and your Gems.  Do what you need to, but get rid of it. 

Now install a PPA to get the latest version of Node.js

Add XDebug to Ubuntu 14.04

It's pretty easy to add XDebug to Ubuntu for PHP and HTML5 Development.  Here's a recipe:

First, install XDebug, this assumes you already have a LAMP stack installed with Apache, PHP, MySQL:

  • sudo apt-get install php5-xdebug

This installed the latest version, which is 2.2.3 at this time.  Now update the options in PHP.INI - /etc/php5/apache2/php.ini 

Internal Nodes: When content types shouldn't be seen

Drupal Modules: 

As Drupal ninja's we use the Drupal framework in funny ways with unintended consequences.  One favorite trick is to create a content type for a list of related choices.  Content creators can add/modify/delete the list of related choices via the admin interface.  But Drupal puts a URL and NODE ID on every piece of content.  

Well, not any longer! 

Git Submodules

Today I was working on a Drupal site, adding the CKEditor WYSIWYG editor into my code base for a new site deployment.  It's a step I have to do each time I deploy a site, and each time there is a new version of CKEditor that I want.  Wouldn't it be neato if I could just add the git repo for the CKEditor project to my project?  Then I could just pull new versions directly in with a few GIT commands?

Hello GIT Submodules!

Pages

Subscribe to RSS - blogs