树莓派安装Node.js

首先查看树莓派cpu信息

pi@raspi:~ $ cat /proc/cpuinfo
processor       : 0
model name      : ARMv6-compatible processor rev 7 (v6l)
BogoMIPS        : 2.00
Features        : half thumb fastmult vfp edsp java tls
CPU implementer : 0x41
CPU architecture: 7
CPU variant     : 0x0
CPU part        : 0xb76
CPU revision    : 7

Hardware        : BCM2708
Revision        : 000e
Serial          : 000000004a8acb6d

看清楚cpu构架,是ARMv6

Linux下更改时区

Linux中时区代码都在/usr/share/zoneinfo/目录中

首先删除默认时区

#rm /etc/localtime

设定新的时区

#ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

完成!

树莓派安装ffmpeg

先安装h264编码器

#!/bin/bash
cd /usr/src
git clone git://git.videolan.org/x264
cd x264
./configure --host=arm-unknown-linux-gnueabi --enable-static --disable-opencl
make
sudo make install

下载源码编译安装ffmpeg

cd /usr/src
git clone git://source.ffmpeg.org/ffmpeg.git
cd ffmpeg
sudo ./configure --arch=armel --target-os=linux --enable-gpl --enable-libx264 --enable-nonfree
make
sudo make install

由于树莓派原因,这个过程很长……很长…… 建议开screen,然后Ctrl+a+d

Linux下将mp3转换为ogg

安装软件

apt-get install mpg321 vorbis-tools 

使用如下命令转换

mpg321 tweet.mp3 -w raw && oggenc raw -o tweet.ogg && rm -rf raw

示例:

root@hkvps:/home/res# mpg321 tweet.mp3 -w raw && oggenc raw -o tweet.ogg && rm -rf raw
High Performance MPEG 1.0/2.0/2.5 Audio Player for Layer 1, 2, and 3.
Version 0.3.2-1 (2012/03/25). Written and copyrights by Joe Drew,
now maintained by Nanakos Chrysostomos and others.
Uses code from various people. See 'README' for more!
THIS SOFTWARE COMES WITH ABSOLUTELY NO WARRANTY! USE AT YOUR OWN RISK!

Playing MPEG stream from tweet.mp3 ...
MPEG 1.0 layer III, 192 kbit/s, 44100 Hz joint-stereo

[4:45] Decoding of tweet.mp3 finished.
Opening with wav module: WAV file reader
Encoding "raw" to
		"tweet.ogg"
at quality 3.00
		[ 99.7%] [ 0m00s remaining] |

Done encoding file "tweet.ogg"

		File length:  4m 45.0s
		Elapsed time: 0m 16.3s
		Rate:         17.5056
		Average bitrate: 112.1 kb/s

root@hkvps:/home/res# ll

科目一过咧

驾校交钱已经一年了,一直没时间考试,上次报考的科目一由于临时加班没去成,这次重新交钱补考。

昨儿晚把驾校发的书翻了一遍,然后就是在手机上用车轮考驾照不停的练习。

0%