Google Photo Auto Backup on Linux + wine

30 июня 2017 Comments off

Для того, чтобы заставить работать Google Photo Auto backup из-под wine нужно:

1. Поставить google photo на windows-машине (я делал в виртуалке)
2. Залогиниться там.
3. Экспортироват ветку реестра [HKEY_CURRENT_USER\Software\Google\Picasa\Picasa2\Preferences]
4. Импортировать ветку реестра в wine
5. Поставить Google Photo Auto backup из-под wine.

Источник: https://askubuntu.com/questions/602555/alternative-for-google-auto-backup-of-image-how-would-i-automate-resize-and

Categories: Linux Tags: ,

Как исправить кодировку тегов MP3 в Ubuntu | LinuxRussia.com

15 декабря 2016 Comments off

sudo apt-get install python-mutagen
cd ~/Music
find -iname '*.mp3' -print0 | xargs -0 mid3iconv -eCP1251 --remove-v1

Как исправить кодировку тегов MP3 в Ubuntu

Источник: Как исправить кодировку тегов MP3 в Ubuntu | LinuxRussia.com

Categories: Без рубрики Tags:

Ubuntu: touchpad не включить после выключения

13 декабря 2015 Comments off

После выключения touchpad и перезагрузки компьютера его не включить заново.

Варианты включения:
1. Запускаем dconf-editor и правим org.gnome.desktop.peripherals.touchpad send-events в enabled
2. gsettings set org.gnome.desktop.peripherals.touchpad send-events enabled

Categories: Без рубрики Tags:

sonata_type_boolean значения true/false

23 июля 2015 Comments off

sonata_type_boolean по умолчанию использует «1» для true, «2» для false. Для того чтобы было 1/0 нужно установить опцию transform: true.
В большом проекте каждый раз указывать данную опцию не удобно, по этому можно сделать override данного типа:


$ app/console generate:bundle

Bundle namespace: Override/Sonata/CoreBundle
Bundle name [OverrideSonataCoreBundle]:
Target directory [../src]:
Configuration format (yml, xml, php, or annotation): yml
Do you want to generate the whole directory structure [no]?
Generating the bundle code: OK
Checking that the bundle is autoloaded: OK
Confirm automatic update of your Kernel [yes]? yes
Enabling the bundle inside the Kernel: OK
Confirm automatic update of the Routing [yes]? no
Importing the bundle routing resource: OK

Воссоздадим структуру создав структуру каталогов:
src/Override/Sonata/CoreBundle/Form/Type

И сам класс:

< ?php namespace Override\Sonata\CoreBundle\Form\Type; use Symfony\Component\OptionsResolver\OptionsResolver; class BooleanType extends \Sonata\CoreBundle\Form\Type\BooleanType{ /** * {@inheritDoc} */ public function configureOptions(OptionsResolver $resolver) { $resolver->setDefaults(array(
'catalogue' => 'SonataCoreBundle',
'choices' => array(
self::TYPE_YES => 'label_type_yes',
self::TYPE_NO => 'label_type_no',
),
'transform' => true,
));
}
}

Отличие от родительского класса: ‘transform’ => true

Объявим в сервисах:

src/Override/Sonata/CoreBundle/Resources/config $ cat services.yml
services:
override.sonata.core.form.type.boolean:
class: Override\Sonata\CoreBundle\Form\Type\BooleanType
tags:
- { name: "form.type", alias: "sonata_type_boolean" }

JMSTranslationBundle + Sonata Admin

17 июля 2015 Comments off

1. Добавляем в composer.json


"jms/di-extra-bundle": "dev-master",
"jms/translation-bundle": "dev-master"

2. config_dev.yml

jms_translation:
configs:
vendor_core:
dirs: [%kernel.root_dir%/../src/Vendor/CoreBundle]
output_dir: %kernel.root_dir%/../src/Vendor/CoreBundle/Resources/translations
excluded_dirs: ["Test"]
extractors: [sonata_admin]

3. routing_dev.yml

JMSTranslationBundle_ui:
resource: @JMSTranslationBundle/Controller/
type: annotation
prefix: /_trans

4. Генерация файла
app/console translation:extract en --config=vendor_core --output-format=xliff

5. Редактирование

Доступно по http://127.0.0.1/_trans

Categories: Symfony Tags: ,

QQ International + Wine

28 апреля 2015 Comments off

Для того чтобы можно было видеть текст при вводе в textfield:

winetricks riched20

Проблема краша: https://bugs.winehq.org/show_bug.cgi?id=34566

Пересборка wine из git:

git clone http://source.winehq.org/git/wine.git
cd wine
./configure --enable-win64
./tools/wineinstall

Categories: Linux Tags:

Linux: как записать образ ISO (Windows) на USB-флешку

24 ноября 2014 Comments off

Из-под Linux:
sudo winusb --format /home/pavel/Downloads/ZverDVD_2014.5.ISO /dev/sdc

или:
sudo winusb --install /home/pavel/Downloads/ZverDVD_2014.5.ISO /dev/sdc

Не забываем пото поставить флаг «boot» через partition editor.

Из-под Windows: UltraISO

Categories: Linux Tags:

Сборка ванильного ядра для Ubuntu

31 октября 2014 Comments off

1. Ставим нужные пакеты
sudo apt-get install kernel-package

2. Качаем/распаковываем ядро

3. Копируем конфиг
cd linux-.....
cp /boot/config-$(uname -r) .config

4. Конфигурим
yes "" | make oldconfig

5. Генерим пакеты ядра и хедеров
fakeroot make-kpkg --initrd --append-to-version=-patched kernel-image kernel-headers

6. Инсталлируем пакеты
dpkg -i ...

Categories: Без рубрики Tags:

Google Earth + Ubuntu 14.04

12 июля 2014 Comments off

Установка 7-й версии:

Установить 7-ю версию с сайта у меня так и не получилось.

Заметки по 7 версии:
http://compizomania.blogspot.com/2013/09/google-earth-7122019-ubuntu-1310-linux.html

Установка 6-й версии:

sudo apt-get install lsb-core

Для работы русских шрифтов:
sudo apt-get install xfonts-cyrillic

Заметки по 6 версии:

help.ubuntu.com

Categories: Linux Tags:

Самовосстанавливающиеся автоматы (автоматы с повторным включением)

29 июня 2014 Comments off
Categories: Без рубрики Tags: