https://www.loyalsoldier.me/fuck-the-gfw-with-my-own-shadowsocks-server/
分类:技术
技术
Erlang 安装使用rfc4627
环境: Ubuntu 14.04
编译
git clone git://github.com/tonyg/erlang-rfc4627.git
cd erlang-rfc4627/
make all
获取erlang library路径
jerry@iZ28ktvewfwZ:~$ erl
Erlang R16B03 (erts-5.10.4) [source] [64-bit] [async-threads:10] [kernel-poll:false]
Eshell V5.10.4 (abort with ^G)
1> code:get_path().
[“.”,”/usr/lib/erlang/lib/kernel-2.16.4/ebin”,
“/usr/lib/erlang/lib/stdlib-1.19.4/ebin”,
“/usr/lib/erlang/lib/xmerl-1.3.5/ebin”,
“/usr/lib/erlang/lib/wx-1.1.1”,
[…]|…]
2>
将文件夹拷贝到相应目录下
sudo cp -R erlang-rfc4627/ /usr/lib/erlang/lib/
测试使用
jerry@iZ28ktvewfwZ:~$ erl
Erlang R16B03 (erts-5.10.4) [source] [64-bit] [async-threads:10] [kernel-poll:false]
Eshell V5.10.4 (abort with ^G)
1> O = rfc4627:encode({obj, [{name, hideto}, {age, 23}]}).
“{\”name\”:\”hideto\”,\”age\”:23}”
2>
红米4A ROOT步骤
1. 下载开发版,刷入这个版本
http://www.miui.com/download-325.html
http://www.miui.com/shuaji-329.html
使用命令行
adb push miui_HM4A_7.4.27_e52ef2df2a_6.0.zip /sdcard/
或者在这图形界面上拷贝
2.申请解锁权限
注册小米帐号后进入申请解锁http://www.miui.com/unlock/
3.按音量下+电源键进入Fastboot模式
4.http://www.miui.com/unlock/done.html下载解锁工具(miflash_unlock)解锁并重启手机
5.进入安全中心-》授权管理-》开启root
6.重启完就好了
链接:
http://www.miui.com/thread-3852678-1-1.html
http://www.miui.com/thread-6297807-1-1.html
scala去除字符串中的中文乱码
str1.getBytes(“GB2312”).forall(_ % 63 != 0)
Mac 拷贝出错
在mac上使用外置硬盘拷贝数据时出现”One or more items in… can’t be changed because they are in use”
解决如下:
xattr -d com.apple.FinderInfo <filename>
ip查看
http://ip-check.info/?lang=en
mrjob安装
环境:Ubuntu 14.04, Centos 6.5
方法一:
python setup.py install
方法二:
pip install mrjob
方法三:
python setup.py build
在运行脚本中加载库
import os,sys
sys.path.append(os.path.abspath(‘mrjob/build/lib/’))
from mrjob.job import MRJob
这8种武器点亮程序员的个人品牌
http://blog.csdn.net/foruok/article/details/49582279
Docker加速
万恶的gfw造成使用docker加载超慢,只好通过国内的阿里云来加速。
打开 https://dev.aliyun.com/search.html
右上角有“管理中心”,点击使用阿里帐户登录。
点击”加速器“
下面有详细的docker加速操作步骤
还有daocloud的加速服务
创建或修改 /etc/docker/daemon.json 文件,修改为如下形式
{
"registry-mirrors": [
"加速地址"
],
"insecure-registries": []
}
通过比较daocloud要比aliyun快不少。
另外一种方法是使用http代理:
HTTP_PROXY=proxy-server:8080 docker pull clipper/sklearn_cifar_container
git 源码更新操作
git submodule update –init –recursive