博文

docker use daemon.json and override default systemd

sudo systemctl edit docker [Service] ExecStart= ExecStart=/usr/bin/dockerd  sudo vim /etc/docker/daemon.json   {   "storage-driver": "overlay2", "registry-mirrors": ["https:// "], "hosts": ["unix://", "tcp://0.0.0.0:2376"] }

docker ustc registry mirror 使用

    在国内pull docker hub 的 image 速度是很慢的,用过国内多家的 registry mirror,发现速度最快的还是usts的,mirror 地址 https://docker.mirrors.ustc.edu.cn。      我使用的是Debian ,修改  /lib/systemd/system/docker.service [Unit] Description=Docker Application Container Engine Documentation=http://docs.docker.com After=network.target docker.socket Requires=docker.socket [Service] Type=notify ExecStart=/usr/bin/docker daemon -H fd:// -H tcp://127.0.0.1:2376 --registry-mirror=https://docker.mirrors.ustc.edu.cn MountFlags=slave LimitNOFILE=1048576 LimitNPROC=1048576 LimitCORE=infinity [Install] WantedBy=multi-user.target 这样就可以使用mirror,同时设置 tcp 监听,可以在IDEA 里面使用。 ustc docker

docker Debian/Ubuntu USTC open source mirror

    由于防火墙缘故,docker的官方源更新慢的要死,发了个邮件给 USTS ,当天就添加好  了,处理速度很快。赞个!!  使用:   deb http://ftp.cn.debian.org/get.docker.com/ubuntu/ docker main deb http://ftp.cn.debian.org/apt.dockerproject.org/repo/ codename main  添加到  /etc/apt/sources.list  apt-get update  apt-get install -y lxc-docker apt-get install docker-engine  就可以安装最新版本的docker了。

Maven 使用Jrebel 插件

在maven 中使用jrebel 之前,需要安装jrebel的m2eclpise 插件。不然pom.xml 加入 jrebel 插件报错。    Code: ? 1 2 3 4 5 6 7 8 9 10 11 12 13 14 < plugin >                  < groupId >org.zeroturnaround</ groupId >                  < artifactId >jrebel-maven-plugin</ artifactId >                  < version >1.1.5</ version >                  < executions >                      < execution >                          < id >generate-rebel-xml</ id >                          < phase >process-resources</ phase >                          < goals >                              < goal >generate</ goal >                          </ goals >                      </ execution >                  </ executions >              </ plugin > 使用 mvn jrebel:generate  就会在  target/classes 生成  rebel.xml。 更多使用  jrebel-maven

Google 加密搜索

    自从google 撤出中国以后,现在用起来是越来越麻烦了,搜索结果老是被重置。 https://encrypted.google.com  用这个就不许要担心被 404 了。但是这个链接也不是很畅通。 在hosts文件中加入  203.208.41.155  encrypted.google.com   基本上就不会有太大的问题了。  再配上  HTTPS Everywhere chrome app  使用起来更方便。 要是那天出现  google 被重定向到 hk ,使用  www.google.com/ncr  就可以解决。

OpenShift 上jboss 设置时区及中文乱码问题解决

   Openshift 跑java 程序默认的是美国时间,这样我们查看日志是不方便。可以同过 修改  app-root/repo/.openshift/action_hooks/pre_start_jbossas-7   这个文件。 添加  export JAVA_OPTS="-Duser.timezone=Asia/Shanghai " 这样就可以时区 设置为东八区。后来我的博客的邮件提醒的中文就是乱码开始没找到原因。    这两天我在openshift 设置时区后,中文又乱码了,在没有设置之前是没有问题的,我 猜想是不是设置了时区导致中文的乱码?测试了下果然是这个原因。    在网上Google 了 jvm 怎么设置字符编码。   把原来的修改为   export JAVA_OPTS="-Duser.timezone=Asia/Shanghai -Dfile.encoding=utf-8 -Duser.language=zh"   FELIX 提供的新方法:   在.env/user_vars目录建立自定义环境变量,文件名为环境变量名, 文件内容为环境变量值  这样时区问题,和乱码都解决了。

Google Reader 替代品 theoldreader

图片
         Google Reader  在7月1号就要game over 了,没办法找了些Google reader 的替代品。 其中theoldreader 是一个不错的产品,和google reader 很像。在此推荐给广大网友。 http://theoldreader.com   这是链接,可以用google 帐号直接登录,也可以导入google reader 备份出来的xml。这个真的不错,访问比较流畅。 下面是截图。