This file contains 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
<div class="language-selector"> | |
<ul> | |
<?php | |
$languages = icl_get_languages('skip_missing=0&orderby=code&order=asc'); | |
foreach ($languages as &$lang) { | |
$class = ($lang['active'] == 1) ? "active" : ""; | |
echo '<li><a href="' . $lang['url'] . '" class="' . $class . '" title="' . $lang['native_name'] . '">' . $lang['language_code'] . '</a></li>'; | |
} | |
?> | |
</ul> |
This file contains 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
add_filter('option_date_format', 'translate_date_format'); | |
function translate_date_format($format) { | |
if (function_exists('icl_translate')) | |
$format = icl_translate('Formats', $format, $format); | |
return $format; | |
} |
This file contains 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
fixHeights = function() { | |
var children_height = 0; | |
$('.fields-column .margin').height(Math.max(children_height, $('.fields-column .margin').height())); | |
}; |
This file contains 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
sudo dhclient |
This file contains 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
find . | xargs fgrep "search this" |
This file contains 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
for i in *; do if [ -d "$i" ]; then tar czf /archive/"$i".tar.gz "$i"; fi; done |
This file contains 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
after "deploy:symlink", "deploy:restart_workers" | |
## | |
# Rake helper task. | |
# http://pastie.org/255489 | |
# http://geminstallthat.wordpress.com/2008/01/27/rake-tasks-through-capistrano/ | |
# http://ananelson.com/said/on/2007/12/30/remote-rake-tasks-with-capistrano/ | |
def run_remote_rake(rake_cmd) | |
rake_args = ENV['RAKE_ARGS'].to_s.split(',') | |
cmd = "cd #{fetch(:latest_release)} && #{fetch(:rake, "rake")} RAILS_ENV=#{fetch(:rails_env, "production")} #{rake_cmd}" |
This file contains 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
# 2010-10-01 | |
# | |
# Mac OS X 10.6.3 | |
# Homebrew 0.7 | |
# Xcode 3.2.4 | |
# Git 1.7.3.1 | |
# RVM 1.0.12 | |
# Ruby 1.9.2, 1.8.7 | |
# Rails 3.0.0 | |
# Passenger 3.0.0.pre4 |
This file contains 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 | |
set -e | |
REDMINE_URL="http://rubyforge.org/frs/download.php/75097/redmine-1.2.1.tar.gz" | |
S3_ACCESS_KEY_ID="" | |
S3_SECRET_ACCESS_KEY="" | |
S3_BUCKET_NAME="" | |
HEROKU_APP_NAME="" |
OlderNewer