nerd afdelingnerd afdeling

Open a file in Coda from the terminal

Open ~/.bash_profile and paste the code below:

# Coda
# set path
export CODA_PATH=/Applications/Coda.app
# function roughly like 'mate .' by expanding '.' to '*.htm*'
coda () {
if [[ "." == $1 ]]
then
    open -a $CODA_PATH *.htm*
else
    open -a $CODA_PATH $1 $2 $3
fi
}

Tags terminal, coda
Create menu link translations using 118n

Creating menu link translations can be done with the following steps:

1. Get the Menu Link IDs.

2. Create translation set (or load a translation set by translation set id 'tsid')

3. Add the menu links as items to the translation set.

Tags translation
Resetting Drupal Passwords in Drupal 7 with Drush

# Get an admin login link
drush uli 
# Set the password for any user
drush upwd admin --password="newpassword"

Tags terminal, Drupal, Drush
Compiling Apache 2.2.x on Snow Leopard Server

First you need to symlink Xcode ToolChains to avoid the following compilation error:

Tags Apache, command line, os x
Get the textual value when using entity_metadata_wrapper in Drupal

When you want the value of a field in a entity_metadata_wrapper you normally use

Tags Drupal, php
Display all enabled modules of a Drupal site

<?php
$list 
system_list('module_enabled');
Tags Drupal, php
Write and read debug logs in Drupal

Write some data to a log file:

<?php
$debug_data 
= array(
Tags Drupal, php
Javascript equivalent for drupal_explode_tags()

  /**
   * Explode a string of given tags into an array.
   */
  function drupalExplodeTags(str) {
Tags Drupal, JavaScript
Handige Git commando's

Repository klonen:

  • Map maken met projectnaam, map openen
  • 'git clone <git url>'.  Dit maakt een nieuwe map aan met de naam van het project. Dit is de rootmap van het project.

Ignore lijst:

in de rootmap van de site:

Tags GIT

Pagina's