ssh otp 
Install oathtool.
sudo apt-get install oathtool libpam-oath

Generate a secret.
export HEX_SECRET=$(head -10 /dev/urandom | md5sum | cut -b 1-30)

Generate the TOTP details, 6 digits long.
oathtool --verbose --totp $HEX_SECRET

Enter the base32 secret in Android FreeOTP.

Create and populate the /etc/security/users.oath file.
sudo bash -c "echo HOTP/T30 $USER - $HEX_SECRET >> /etc/security/users.oath"
sudo chmod 0600 /etc/security/users.oath

Forget the secret!

prefix /etc/pam.d/sshd with
auth sufficient usersfile=/etc/security/users.oath window=10 digits=6

Allow this in sshd and restart.
sudo sed -Ei -e 's/(ChallengeResponseAuthentication) no/\1 yes/' /etc/ssh/sshd_config
sudo service ssh restart

Test with
ssh localhost

You should see:
One-time password (OATH) for `USER':

To avoid otp for some users prefix /etc/pam.d/sshd with
auth [success=1 default=ignore] user in user1:user2

[ view entry ] ( 2033 views )   |  print article
convert to mp4 
ffmpeg -i input.mp4 -pix_fmt yuv420p -vcodec libx264 -acodec aac output.mp4

[ view entry ] ( 1482 views )   |  print article
mtp mount Galaxy S3 with jmtpfs or simple-mtpfs 
kio-mtp and mtp-detect stopped working :-(

But jmtpfs seams to work - i decided to mount on usb plug in with an udev rule
#> apt-get install jmtpfs
#> mkdir -p /media/mtp
ACTION=="add", ENV{ID_MTP_DEVICE}=="1", RUN="/usr/bin/jmtpfs -o allow_other /media/mtp"
ACTION=="remove", ENV{ID_MTP_DEVICE}=="1", RUN="/bin/fusermount -u /media/mtp""

A little bit faster is simple-mtpfs, but you have to compile

apt-get install libusb-dev libmtp-dev

git clone
cd imple-mtpfs
mkdir build && cd build
../configure --prefix=/usr
sudo make install

ACTION=="add",ENV{ID_MTP_DEVICE}=="1",RUN="/usr/bin/simple-mtpfs -o allow_other /media/mtp"
ACTION=="remove", ENV{ID_MTP_DEVICE}=="1", RUN="/bin/fusermount -u /media/mtp""

[ view entry ] ( 4945 views )   |  print article
sound conversion 

decode to wav

avconv -i input.m4a output.wav
for f in *.m4a; do avconv -i "$f" "${f/%m4a/wav}"; done
faad -o output.wav input.aac
sox -t raw -r 8000 -A -b 8 -c 1 file.alaw file.wav
sox -t raw -r 8000 -U -b 8 -c 1 file.mulaw test.wav

decode from wav

sox file.wav -t raw -r 8000 -c 1 -b 8 -U file.mulaw
sox file.wav -t raw -r 8000 -c 1 -b 8 -A file.alaw


sox test.wav 60secs.wav --show-progress trim 0 01:00

[ view entry ] ( 1901 views )   |  print article
flash minix neo x5 only with adb 
minix> click right bottom (clock), click settings, click settings on bottom
and choose com.rockchip.settings.
minix> enable Usb debugging
minix> select device and change usb connection (PC) to MTP.
minix> connect minix with USB Cable to PC.

ubuntu> echo 0x2207 >> ~/.android/adb_usb.ini
ubuntu> apt-get install android-tools-adb (get a root shell with adb shell)
ubuntu> sudo adb start-server
ubuntu> adb devices (you should see your minix device)

ubuntu> download ...
and rename it to
( ... ?t=2230186)
ubuntu> adb push /sdcard/
ubuntu> adb reboot
minix> on boot you are prompted to install the update, confirm it
after install completed
ubuntu> adb reboot recovery
minix> choose install zip from sideload
ubuntu> download ...
( ... Minix-Roms)
ubuntu> adb sideload
minix> reboot system now

Update: I've installed this image now.

[ view entry ] ( 2156 views )   |  print article

<<First <Back | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | Next> Last>>