This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
credentials='' | |
database='' | |
TABLES=`mysql $credentials -B -N -e "select TABLE_NAME from information_schema.TABLES where TABLE_SCHEMA='$database'"` | |
for table in $TABLES; do | |
echo -n "dumping $database.$table... " | |
if [[ $table == cache* ]]; then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Vagrant::Config.run do |config| | |
# box | |
config.vm.box = "precise32" | |
config.vm.box_url = "http://files.vagrantup.com/precise32.box" | |
# ports | |
config.vm.forward_port 80, 8080 | |
# puppet | |
config.vm.share_folder "puppet-files", "/etc/puppet/files", "puppet/files" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
global $language; | |
$original_path = drupal_lookup_path('source', 'your/source/language/path', 'en'); | |
$translated_nodes = translation_path_get_translations($original_path); | |
$translated_node = $translated_nodes[$language->language] ? $translated_nodes[$language->language] : $original_path; | |
$translated_path = url($translated_node); |