海运的博客

CentOS6升级安装GCC4.82

发布时间:January 24, 2015 // 分类: // No Comments

使用Centos官方源安装:

wget http://people.centos.org/tru/devtools-2/devtools-2.repo  -P /etc/yum.repos.d
yum install devtoolset-2-gcc
yum install devtoolset-2-gcc-c++
export CC=/opt/rh/devtoolset-2/root/usr/bin/gcc
export CPP=/opt/rh/devtoolset-2/root/usr/bin/cpp
export CXX=/opt/rh/devtoolset-2/root/usr/bin/g++

编译安装GCC:

yum install gmp-devel mpfr-devel  libmpc-devel
wget ftp://ftp.gnu.org/gnu/gcc/gcc-4.8.2/gcc-4.8.2.tar.gz
tar zxf gcc-4.8.2.tar.gz
cd gcc-4.8.2
./configure --enable-languages=c,c++ --disable-multilib
make && make install

全球各国家IP/ASN及BGP路由信息

发布时间:January 20, 2015 // 分类: // No Comments

全球IP/ASN由ICANN负责分配和管理,ICANN将部分IP地址分配给地区级的Internet注册机构 (RIR),然后由这些RIR负责该地区的登记注册服务。
全球一共有5个RIR,其分配的IP信息如下:
北美地区
ftp://ftp.arin.net/pub/stats/arin/delegated-arin-extended-latest
欧洲地区
ftp://ftp.ripe.net/ripe/stats/delegated-ripencc-latest
非洲地区
ftp://ftp.afrinic.net/pub/stats/afrinic/delegated-afrinic-latest
亚太地区
ftp://ftp.apnic.net/pub/stats/apnic/delegated-apnic-latest
拉丁美洲
ftp://ftp.lacnic.net/pub/stats/lacnic/delegated-lacnic-latest
ISO国家标准码:
http://www.iso.org/iso/home/standards/country_codes/country_names_and_code_elements_txt-temp.htm
全球BGP路由表信息:
http://routeviews.org/
http://bgp.potaroo.net/index-bgp.html
可telnet的主干网路由,查询全球路由表:
route-server.ip.att.net
route-views.routeviews.org

此内容被密码保护

发布时间:January 17, 2015 // 分类: // No Comments

请输入密码访问

此内容被密码保护

发布时间:January 17, 2015 // 分类: // No Comments

请输入密码访问

PHP交互式运行环境(REPL)

发布时间:January 14, 2015 // 分类:PHP // No Comments

用过PYthon下命令行界面很方面学习和调试,Google了原来叫做REPL,PHP下也有类似的实现。
https://github.com/bobthecow/psysh

wget psysh.org/psysh
chmod +x psysh
./psysh

2015.1.30更新:
之前真是孤陋寡闻了,PHP自5.1后已经自带交互式运行环境了,且有两种模式:
1.交互式模式,一问一答:

php -a
Interactive shell

php > echo time() . "\n";
1422604231
php > 

2.执行一段php格式的代码,按Ctrl-D执行:

php
<?php
echo time().PHP_EOL;
1422604533
分类
最新文章
最近回复
  • 海运: 恩山有很多。
  • swsend: 大佬可以分享一下固件吗,谢谢。
  • Jimmy: 方法一 nghtp3步骤需要改成如下才能编译成功: git clone https://git...
  • 海运: 地址格式和udpxy一样,udpxy和msd_lite能用这个就能用。
  • 1: 怎么用 编译后的程序在家里路由器内任意一台设备上运行就可以吗?比如笔记本电脑 m参数是笔记本的...
  • 孤狼: ups_status_set: seems that UPS [BK650M2-CH] is ...
  • 孤狼: 擦。。。。apcupsd会失联 nut在冲到到100的时候会ONBATT进入关机状态,我想想办...
  • 海运: 网络,找到相应的url编辑重发请求,firefox有此功能,其它未知。
  • knetxp: 用浏览器F12网络拦截或监听后编辑重发请求,修改url中的set为set_super,将POS...
  • Albert: 啊啊啊啊啊啊啊啊啊 我太激动了,终于好了英文区搜索了半天,翻遍了 pve 论坛没找到好方法,博...