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 | |
} |
#!/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); |