[linux] Install gcc
wget http://ftp.gnu.org/gnu/gcc/gcc-6.1.0/gcc-6.1.0.tar.gz tar -zvxf gcc-6.1.0.tar.gz --directory=/usr/local/ cd /usr/local/gcc-6.1.0 sudo ./contrib/download_prerequisites sudo mkdir build cd build sudo ../configure -enable-checking=release -enable-languages=c,c++ -disable-multilib...[embeded] A sample of searial port communication
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/types.h> #include <unistd.h> #include <fcntl.h> #include <sys/stat.h> #include <termios.h> void main() { struct termios opt; int tty; int len; int i; unsigned...[linux]How to build ethtool by crosstool
cd ethtool-5.0/ ./configure --host=arm-xilinx-linux-gnueabi-gcc LDFLAGS=-static make[linux]How to build tcpdump by crosstool
cd libpcap-1.9.0/ ./configure --prefix=$PWD/install --host=arm-xilinx-linux-gnueabi --with-pcap=linux make make install cd tcpdump-4.9.2/ ./configure --host=arm-xilinx-linux-gnueabi make[linux]How to access ini file by shell
readIni() { file=$1; section=$2; item=$3; val=$(awk -F '=' '/\['${section}'\]/{a=1} (a==1 && "'${item}'"==$1){a=0;print $2}' ${file}) echo ${val} } writeIni() { file=$1; section=$2; item=$3; val=$4; awk -F '=' '/\['${section}'\]/{a=1} (a==1 && "'${i...标签: linux
[linux]Recover a directory by 'mv' command
Sometimes mv a directory to a exist directory will cause error. mv /home/dd/bb /home/cc/bb If bb has always created in cc directory,the bb will be moved to bb as a subdirectory. So, we key like this in command while doing this: mv /home/dd/bb /home/cc/ -f标签: linux
[linux]How to change password
echo user:pass|chpasswd标签: linux
[linux]A simple driver of linux
hello.c #include <linux/init.h> #include <linux/module.h> static int hello_init(void){ printk(KERN_INFO "Hello nicholas, driver is comming\n"); return 0; } static void hello_exit(void){ printk(KERN_INFO "See you, driver"); } module_init(hello_init); ...标签: linux
[linux]LAMP一键web遭遇记
这两天居然在搭建LAMP服务器这种事情上翻船了,昨天新买了个阿里云的ECS,座标美国,开开心心地用ssh连上服务器,上传一键web安装脚本,然后运行,由于要一个小时左右,我就先去跑步了,结果回家后一看果然就安装成功了。然而…… netstat -tunl 打下去之后,没有80端口, 一定是哪里不对了,于是检查脚本,手动安装,更换不同版本,简直能想的办法都想尽了, 始终没能跑起来。这一弄就到了凌晨2点,一点也不困,但我心里还是知道的,我这一把年纪了,不宜熬夜,虽然大脚越发清醒,却明明感觉心累,强迫自己关机睡觉。 睡床上还在想,明天应该试试换个系统,...标签: linux
[C]Safari对websocket的支持及websocket版本问题的解决记
昨天有人反应苹果手机不能访问我的物联网项目,我大惊,立马开始分析。 发现果然苹果端的safari连接websocket失败了。但是我确信之前一直用着好好的。可能是贱贱的A厂悄悄变更了某些软件吧,没办法,谁让世人都称他是老大,谁让你们那么多人没有iPhone不行呢。我只好认为我自己的服务器有问题了。 于是检查服务器的日志,发现websocket的握手过程显示协议错误。 那么我抓包分析下safari与其他浏览器的行为有什么不一样吧: 这是Google: Sec-WebSocket-Key:GX2sEWmKLhgktWvslt8xxw== Sec-WebSocket...日历
最新微语
- Watching the autumn leaves falling as you grow older together
2018-10-25 09:45
- 时间不可以倒流,但空间可以
2017-08-01 09:03
- 含羞草、电磁炮;汽车工业革命
2017-05-23 22:51
- 那个点子页面加几点:
去中心化的物联网通信协议
2017-05-09 22:13
- 有一种人怀疑阴阳的存在,另有一种人会怀疑1+1=2的正确性……
2017-03-01 17:08
分类
最新评论
- 萧
@Fluzak:The web host... - Fluzak
Nice blog here! Also... - Albertarive
In my opinion you co... - ChesterHep
What does it plan? - ChesterHep
No, opposite. - mojoheadz
Everything is OK!... - Josephmaigh
I just want to say t... - ChesterHep
What good topic - AnthonyBub
Certainly, never it ... - DavidNed
I think, that you ar...