test if modeswitch works
$ sudo usb_modeswitch -v 0x12d1 -p 0x1f01 -M "55534243123456780000000000000a11062000000000000100000000000000"
if yes than usually you would do this (but for me it did not work)
#edit config file
/etc/usb_modeswitch.conf
| openssl rsa -in ~/.ssh/id_rsa -outform pem > id_rsa.pem | |
| chmod 600 id_rsa.pem |
| rabbitmqctl add_user test test | |
| rabbitmqctl set_user_tags test administrator | |
| rabbitmqctl set_permissions -p / test ".*" ".*" ".*" |
test if modeswitch works
$ sudo usb_modeswitch -v 0x12d1 -p 0x1f01 -M "55534243123456780000000000000a11062000000000000100000000000000"
if yes than usually you would do this (but for me it did not work)
#edit config file
/etc/usb_modeswitch.conf
| #!/usr/bin/env sh | |
| trap 'killall' INT | |
| killall() { | |
| trap '' INT TERM # ignore INT and TERM while shutting down | |
| echo "**** Shutting down... ****" # added double quotes | |
| kill -TERM 0 # fixed order, send TERM not INT | |
| wait | |
| echo DONE | |
| } |
| 1) In the form, you must override fieldClass | |
| <?php $form = ActiveForm::begin([ | |
| 'fieldClass' => 'backend\widgets\ActiveField' | |
| ]); ?> | |
| 2) To override the method | |
| <?php | |
| class ActiveField extends \yii\widgets\ActiveField | |
| { |
| #!/bin/bash | |
| case "${1:-''}" in | |
| 'start') | |
| if test -f /tmp/apache-tika.pid | |
| then | |
| echo "Tita is already running." | |
| else | |
| java -jar /var/lib/apache-tika/tika-server-1.9.jar > /var/log/apache-tika/output.log 2> /var/log/apache-tika/error.log & echo $! > /tmp/apache-tika.pid | |
| echo "Starting Tika..." |
| #!/bin/bash | |
| # Following the guide found at this page | |
| # http://programmingarehard.com/2014/03/17/behat-and-selenium-in-vagrant.html | |
| echo "\r\nUpdating system ...\r\n" | |
| sudo apt-get update | |
| # Create folder to place selenium in |
| <?php | |
| $this->imgMetadata['format'] = strtolower($this->imagickObj->getImageFormat()); | |
| $this->imgMetadata['width'] = $this->imagickObj->getImageWidth(); | |
| $this->imgMetadata['height'] = $this->imagickObj->getImageHeight(); | |
| $x = $y = 0; | |
| switch ($gravity) { | |
| case 'center': | |
| // $gravity = \Imagick::GRAVITY_CENTER; | |
| $x = ($this->imgMetadata['width']/2) - ($width/2); |
| Mapping | |
| { | |
| "product" : { | |
| "properties" : { | |
| "doc" : { | |
| "properties" : { | |
| "name" : { | |
| "type" : "string", | |
| "include_in_all" : true | |
| } |
| Всем привет! Подскажите у кого нибудь есть библиотека для работы с апи ютуба. Необходима загружать видеоролики в канал. Спасибо |