UTC时间 2017-08-01 18:12,UAHF第一个大于1MB的块被挖出,虽然现在算力占比很小,但值得关注,UAHF是否能存活下去,算力来决定吧。
Set Local Repo by Iso
想要挂载一个iso安装镜像作为本地repo
mount iso
mkdir -p /mnt/cdrom
mount -t iso9660 -o loop /home/Centosxxxx.iso /mnt/cdrom
set local repo
vi /etc/yum.repos.d/local.repo
[localrepo]
name=Unixmen Repository
baseurl=file:///mnt/cdrom
gpgcheck=0
enabled=1
set up
yum clean all
yum repolist
Deploy Local Ntp Server on Centos7
有时候需要内网环境搭建一个ntp服务器同步内网的几台机器。
四步走:
安装ntpd
yum -y install ntp ntpdate
修改/etc/ntpd.conf
# line 18: add the network range you allow to receive requests
restrict 10.0.0.0 mask 255.255.255.0 nomodify notrap
# local clock
server 127.127.1.0
fudge 127.127.1.0 stratum 10
重启
systemctl start ntpd
systemctl enable ntpd
firewall-cmd --add-service=ntp --permanent
firewall-cmd --reload
瞄一眼
watch ntpq -p
注意reach这个值,在启动ntp server服务后,这个值就从0开始不断增加,当增加到17的时候,从0到17是5次的变更,每一次是poll的值的秒数,是64秒*5=320秒的时间。
如果之后从ntp客户端同步ntp server还失败的话,用ntpdate –d来查询详细错误信息,再做判断。
How to Update to gcc4.9.x on Centos7
现在很多软件包默认编译要求GLIBCXX >=3.4.20,碰到这种事redhat系又哭了,目前Centos7.x默认仓库里的gcc还是4.8.5的,所以需要一个办法升级gcc相关组件>=4.9.1。
CentOS下升级gcc版本有两个途径,一个是添加其他源进行自动升级,一个是手动编译升级,这里先顺便讲下自动升级的两个办法:
添加Fedora源
在 /etc/yum.repos.d 目录中添加文件 FedoraRepo.repo ,并输入以下内容:
[warning:fedora]
name=fedora
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-23&arch=$basearch
enabled=1
gpgcheck=1
gpgkey=https://getfedora.org/static/34EC9CBA.txt
然后执行
yum update gcc gcc-c++
使用Devtoolset-4升级
yum install centos-release-scl
yum install devtoolset-4-gcc*
scl enable devtoolset-4 bash
which gcc
gcc --version
Migarate Duoshuo to Disqus
没有盈利前景的产品死掉了,话说disqus是怎么活的?
Ant Pool Support Bitcoin Ulimited
比特币诞生8年来最大波澜即将到来,大家拭目以待。
北京时间2017年3月7日凌晨2点半左右,当前比特币全网算力排名第一的矿池蚁池(AntPool)的某个节点通过替代版比特币软件Bitcoin Unlimited(BU)挖到了一个新区块,这标志着蚁池正式向Bitcoin Unlimited(BU)开放投票。
目前蚁池的算力占全网算力的13%左右,加上已有的支持BU的算力,BU支持率达到30%以上。
也许未来一个月很快就会发生一些有趣的事情,这是Bitcoin系统运行8年来的最大波澜。
大家拭目以待。
用Pyinstaller打包python脚本适配windows
一行命令的事,纯python脚本打包出来一般5Mb左右,大小还可以接收。
首先在脚本同目录下加入一个pyinstaller.py:
#!/usr/bin/env python
from PyInstaller.__main__ import run
run()
然后执行:
python pyinstaller.py -c -F <xxxx.py> -p <sdk>
-
为脚本名称 -
为三方包目录
Python在windows CMD中输出中文
在windows CMD中输出中文是比较烦的事情,最简单的就是增加一个windows.py,用的时候import一下:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
class UnicodeStreamFilter:
def __init__(self, target):
self.target = target
self.encoding = 'utf-8'
self.errors = 'replace'
self.encode_to = self.target.encoding
def write(self, s):
if type(s) == str:
s = s.decode("utf-8")
s = s.encode(self.encode_to, self.errors).decode(self.encode_to)
self.target.write(s)
if sys.stdout.encoding == 'cp936':
sys.stdout = UnicodeStreamFilter(sys.stdout)
加密技术发展
比特币是建立在区块链基础上的,区块链的基本技术支撑有三个:
-
非对称加密
-
点对点网络技术
-
HASH现金
其中非对称加密和HASH现金技术的历史发展颇有渊源,最近仔细学习了一下密码学科普知识,总结一下。
GPU运算卡备存
科技产品的命名一很高冷,就是老发烧友,过了几年再来看新产品的名儿,仍有可能一头雾水。
这其中显卡命名尤甚,为了不把马良认成马超,留存一下。
从知乎上爬来一堆资料,先来备忘一下基础知识:
作者:老汤 链接:https://zhuanlan.zhihu.com/p/20585886