Skip to content

Instantly share code, notes, and snippets.

View jboonstra's full-sized avatar

Joel Boonstra jboonstra

View GitHub Profile
# add to .ssh/config
Host !login.itickets.com *.itickets.com
ProxyCommand ssh john@login.itickets.com nc %h %p
Host *.itickets.com
IdentitiesOnly yes
User john
Host *
AddKeysToAgent yes
updateVersionDropdown : function() {
var versionsByLang = {},
getLang = function (v) { return v.get('lang'); },
selectorHTML;
// Loop through the version model
_.each(
// Group versions by language,
// and sort the lang keys alphabetically.
_.groupBy(_.sortBy(this._versions.models, getLang), getLang),
updateVersionDropdown : function() {
var versionsByLang = {};
// Group versions by language, and sort the lang keys alphabetically.
_.each(_.groupBy(_.sortBy(this._versions.models, function (ver) {
return ver.get('lang');
}), function (ver) {
return ver.get('lang');
}), function(version, lang) {
// Sort the versions within each lang group,
<?php
function i18nPOStrings() {
$locale = str_replace('-', '_', get_instance()->config->item('language_ui')->locale);
//$default = str_replace('-', '_', get_instance()->config->item('language_ui_default')->locale);
$dir = APPPATH . 'language/locale/' . $locale . '/LC_MESSAGES/';
$files = glob($dir . '*.po');
foreach ($files as $file) {
$contents .= file_get_contents($file) or die('Could not read from file.');
// option 1 - "versions" key points to an array
{"versions":
[
{"version":{"id":...}},
{"version":{"id":...}},
]
}
// option 2 - "version" key points to an array
{"versions":