-
使用SCP传输文件
Dec 08, 2015
示例:用户名root 地址 2.33.153.67 下载文件 scp [email protected]:/root/test.mp4 /home/pi/ 将服务器上的/root/test.mp4下载到本地/home/pi文件夹 上传文件 scp /home/pi/ok.txt [email protected]:/root 将本地/home/pi/ok.txt上传至服务器/root文件夹 …
-
树莓派安装Node.js
Dec 03, 2015
首先查看树莓派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下更改时区
Nov 30, 2015
Linux中时区代码都在/usr/share/zoneinfo/目录中 首先删除默认时区 #rm /etc/localtime 设定新的时区 #ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime 完成!
-
树莓派安装ffmpeg
Nov 07, 2015
先安装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
Oct 21, 2015
安装软件 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
-
StartSSL免费证书与Nginx配置
Oct 14, 2015
注册StartSSL 打开https://www.startssl.com/,点击Sign-up开始注册 参考上图填写注册信息,然后Continue,会有如下提示,系统会发送验证码到你的注册邮箱 …
-
Gandi免费SSL证书使用方法
Sep 24, 2015
首先澄清此文中的免费不是真的免费,而是新注册或转移域名到Gandi,都可以获得标准版SSL证书一年的免费使用。 符合以上条件的话,可以进行下面操作了! …
-
树莓派开启root登录
Sep 18, 2015
想要通过ssh登录树莓派进行管理,使用默认的pi用户有时真的不便,对于linux老手来说,可以直接开启root用户ssh登录,这就方便多了,方法如下: …
-
使用Photoshop压缩PNG图片
Sep 13, 2015
Ctrl+O 打开PNG文件 图像 -> 调整 -> 色调分离 调整色阶值,边调整边预览,找到图片质量变化最小时候的值 文件 -> 导出 -> 存储为Web所用格式 文件格式选择PNG-8,参考下图全选部分进行调整,完成后保存即可。 …
-
使用ScrollUp添加返回顶部功能
Sep 08, 2015
下载ScrollUp https://github.com/markgoodyear/scrollup 在网页中引用jquery.scrollUp.js、jquery.easing.js、jquery.min.js三个JavaScript脚本,注意顺序 …