This blog is rated  R⃣ , viewer discretion is advised

办事难

所有办事难的问题所在都在于:

供小于求。没有竞争。比如你去各地新区说我要来投资,那 zf 部门效率高得没话说。 部门只保 …

Posted

archive

vmware 桥接网络导致linux Redirect Network(New nexthop)

本来是PC,连接千兆以太网上网,vmware装了个Linux,本来好好的,后来加了个usb无线网卡当软AP用,让其他设备通过wifi共享上网, 就老出现网络时断时续,甚至完全掉线。

比 …

Posted

archive

lxml / pyquery 解析 bing 页面xhtml坑一则

不知道谁发明的 xhtml 。坑爹啊。微软的Bing搜索结果页面,是特么xhtml格式的,申明了 xmlns="http://www.w3.org/1999/xhtml",用lxml解析就不能css selector了。解决办法:

pyquery.PyQuery('http://global.bing.com/search?mkt=en-US&q=test').xhtml_to_html()('li')

参 …

Posted

archive

出土文物

现在回想起来,央视老版《三国演义》里室内布景,一副坟墓里拍戏的感觉。

今天在newsmth的history版看到这个:

bearn (秉烛堂主) 于 (Sun Sep 6 14:38:05 2015) 提到:

好像 …

Posted

archive

创新的真谛

最近5年发现我自己患了一种认知上的“时差病”。就是看到过一段话,当时心有窃窃焉,然后就过去了。但是过了几天,几周后就开始发酵,越来越回味觉得有道 …

Posted

archive

现有git项目同步到一个新svn

不要问我为什么这么脑残,反正这个世界就这样。自己好好的用git管理的项目,项目组又用的是svn,把git同步更新到svn,看git-scm的教程也他妈扯蛋,所以东拼西凑撸了个方法 …

Posted

archive

[zz]埃及历史

发信人: noGod2 (911.不流氓无产阶级.牛棚知识分子), 信区: History
标 题: Re: 埃及的历史真的比我们的长好多啊
发信站: 水木社区 (Tue Jul 21 00 …

Posted

archive

今日脑洞两则

首先是一则微博:

@上铁合肥客运段官微 2015-06-01 09:36 转发 26 评论 11
#合客正能量#【旅客补票现金不够[好囧],微信红包解难题[不好意 …

Posted

archive

Whole Earth Catalog

Steve Jobs's Stanford commencement address, a short talk that he gave in 2005 and which went viral after his death in 2011, is, in many ways, the ne plus ultra of Jobsian wisdom. It encapsulated his thoughts on life, love and death. It expressed his lifelong philosophy and motivation. And …

Posted

archive

mitbbs上一娃靠背题进了oracle

发信人: xixixihahaha (xixihaha), 信区: JobHunting
标 题: 真羡慕CS科班出身的马公的记忆力
发信站: BBS 未名空间站 (Thu Oct 16 13:08:31 2014, 美东)

我刷了6遍leetcode了,有的标点符号还是记错。该用大括 …

Posted

archive

Java 的本质[ZZ]

发信人: nimi (泥股拉不二八雞), 信区: Java
标 题: Java 的本质
发信站: 水木社区 (Thu Jul 24 00:02:37 2014), 站内

==请勿对号入座==

Java 在业界得到广泛 …

Posted

archive

iOS后门笔记

lockdownd的tcp端口62078,文档 libimobiledevice.org,厂家有Cellebrite,AccessData (Mobile Phone Examiner),Elcomsoft

com.apple.pcapd 抓包服务

com.apple.mobile.file_relay 文件传输服务。就不说文件了,SQLite库,Voicemail(AMR格式)等啥都包括了。甚至最后 …

Posted

archive

Python的Dictzip实现

https://github.com/CGATOxford/cgat/blob/master/CGAT/dictzip.py

http://code.google.com/p/pytoolkits/source/browse/trunk/utils/stardict/dictzip.py

http://code.google.com/p/idzip/source/browse/idzip/decompressor.py

另外有两个库提供了很吊的gzip和bz2 random access

http …

Posted

archive

if you don't read

"Well sonny boy, if you don't read, you start eating marijuana. When you eat marijuana, you get hepatitis X. Hepatitis X is like Hepatitis B except 10X stronger. When you get Hepatitis X, your private parts fall off and you start developing a taste for the band Limb Bizkit. Your …

Posted

archive

A rule of thumb is that you have security by obscurity

摘录一些

Jack Voth, Algenol’s information technology chief, stumbled on something odd: a telnet connection to its videoconference camera from an Internet Protocol address in China

Hacking attacks come from many countries, he says, but most are efforts to steal credit-card information. Chinese hackers, by contrast, tend …

Posted

archive

Haskell, Ruby, Python, Nodejs如何把一个句子的词语倒序

Haskell:

unwords . reverse . words $ sentence

Ruby:

sentence.split.reverse.join ' '

Python:

" ".join(reversed(sentence.split()))

Node.js:

var EventEmitter = require('events').EventEmitter;

var emitter = new EventEmitter();

emitter.on('got sentence', function(sentence) {
    emitter.emit('split sentense', sentence.split(' '));
});
emitter.on('split sentense', function(splitted) {
    emitter.emit('reversed', splitted.reverse());
});
emitter …

Posted

archive

系统IO一些数据

Macmini 下

$ pv /dev/zero > /dev/null
[11.6GiB/s]

这个应该是DDR3内存带宽了。

$ pv /dev/zero > 1.dat
[ 102MiB/s]

Macmini的硬盘速度还是不错。没有SSD快。

$ yes | pv > /dev/null
[20.3MiB/s]

yes这么慢没想到啊。

$ pv /dev/urandom > /dev/null
[11.9MiB/s]

过一下CPU速度就减半了。

Posted

archive

HUAWEI ec315

上市时间:2012年 5月 15日
目标人群:多Wi-Fi设备连接上网需求用户
标准配置:无配件
外观设计:直插
产品尺寸:90.6×28.6×12.6 mm 重量: < 50 g
屏幕显示:无屏幕
电池 …

Posted

archive

Process 流程

Bob:这涉及到职业分工的问题,每个人特长不同,不是吗?

乔布斯:不,这不是擅长与否的问题,而是他们犯糊涂,公司在犯糊涂。公 …

Posted

archive

LBYL vs EAFP

Look Before You Leap

if key in mapping:
    return mapping[key]

Ask Forgiveness than Permission

try:
    return mapping[key]
catch KeyError:
    pass

via

Posted

archive

minor key 的音乐好神奇!!!满满的苏联草原风!

Indiana Jones Theme

Hey Jude

Star Wars Theme

Super Mario Bros

Bad romance

The Happy Godfather

从minor key变成major key。youtube评论说:

The charming story of cheerful Italian immigrants who build a completely legitimate olive oil importing business, and live long, happy lives pursuing the American dream.

via

Posted

archive

[zz]果然,现实更加奇葩

发信人: kamisama (神大人), 信区: NetNovel
标 题: 果然,现实更加奇葩
发信站: 水木社区 (Wed Mar 5 23:35:26 2014), 站内

老老王的PS,看了忍不住想笑

http://www …

Posted

archive

互联网思维 vs 小米思维

最近雷不死把“互联网思维”这个烂词炒爆了。作为弄死飞不起来远离台风口的一只纯黑铸铁猪,在前天也参与了抢购红米 …

Posted

archive

Manually resolve any DNS A record

printf "\0\1\1\0\0\1\0\0\0\0\0\0\6reddit\3com\0\0\1\0\1" |nc -vvuq1 8.8.8.8  53 |xxd

Explain:

0x0001 means transaction ID. Invent one as you like
0x0100 Flag. Always this for all requests
0x0001 number of requests: always …

Posted

archive

The Girl With The Dragon Tattoo

很早就知道这部神片,知道最近才在avfun上看了。记录一下影响最深的一句话,就是 Michel 准备逃下山却被喊住回去,然后被抓到地下室 …

Posted

archive

疑Google员工把8w行Python项目用4w行Java重写了

看发帖IP是亮点。后面后贴的一堆喷子。

发信人: daluobu (阿土仔), 信区: Python
标 题: 终于把一个8万行的Python程序用Java重写了
发信站: 水木社区 (Fri Dec 6 08:10:26 2013), 转信

在噩梦 …

Posted

archive

1995年预言的互联网

Every voice can be heard cheaply and instantly. The result? Every voice is heard. The cacophany more closely resembles citizens band radio, complete with handles, harrasment, and anonymous threats. When most everyone shouts, few listen.

via

Posted

archive

GoLang with Sublime on Windows

好吧。还在力战渣windows。非管理员权限。下载zip包解压到 D:\dev\go

sublime处理中文路径一直很bug。需要修改 /Data/Packages/Default/exec.py:45 行:

    for k, v in proc_env.iteritems():
        nv =  os.path.expandvars(v)
        if isinstance(v, unicode …

Posted

archive

bitcoin —— 末日的狂欢

bitcoin —— 末日的狂欢

bitcoin的出现,对于每一个geek和码农都是boner级别的兴奋的。码农对金融这块“白富美”垂涎已久,过去能接入银行API的,少之又少。而bitcoin直接把胚胎状的一个“白富美”免费送给了每 …

Posted

archive

[zz]为啥转基因双方互相无法说服对方?

est注:这文章很好。说明了现在一个audience问题。

  1. 支持转基因的,基本都不是需要天天做饭买粮的
  2. 真正转基因种子消费者——种地的,压根不 …

Posted

archive

Google Read-time Bidding (doubleclick RTB)

http://www.youtube.com/watch?v=NoGgLxky1FE

视频大概这么个意思:

  • Google Ads会花100ms告诉广告买主,用户IP,所在位置,广告大小,网站分类
  • Google Ads在100ms把广告位卖给出价最高的。

真是碉堡了。If You're Not Paying for It; You're the Product

Posted

archive

pin ssl fingerprint with Chrome HSTS

code:

$ openssl x509 -noout -fingerprint -sha1 -in <(openssl s_client -connect weibo.cn:443 -prexit 2>/dev/null) | python -c "print __import__('sys').stdin.read().partition('=')[2][:-1].replace(':','').decode('hex').encode('base64')"
fUWlLfAlsHpGFDfI4XsFOUWkA7Q=

website: https://www.grc.com/fingerprints.htm

Posted

archive

ubuntu / python编码坑一则

一个django文件上传老是出现unicode error

UnicodeEncodeError: 'ascii' codec can't encode character u'\uWTFH' in position 0: ordinal not in range(128)

折腾了好久 reload(sys) sys.setdefaultencoding() locale.setdefaultlocale()

后来发现是os.environ["LANG"]居然为空。这尼玛为毛啊。

LANG为空也就算了 …

Posted

archive

为什么说Google已经没救了。

Nikesh Arora - Senior Vice President and Chief Business Officer
Sridhar Ramaswamy - Senior Vice President, Ads & Commerce
Amit Singhal - Senior Vice President and software engineer (
Principal Scientist, Search)
Sundar Pichai -Senior Vice President, Android, Chrome & Apps
Vic Gundotra - Senior Vice President, Social (Google plus,
Hangouts, etc.)
Krishna Bharat - Principal Scientist (User …

Posted

archive

小米电视在newsmth上的Q&A

发信人: x414 (安卓工程师), 信区: DigiHome
标 题: 小米电视研发工程师在线答疑 仅限今晚
发信站: 水木社区 (Thu Sep 5 20:07:39 2013), 站内

Q: 哪家 …

Posted

archive

小费

都无聊得去逛 r/china 了

Tipping was a custom invented by employers as a way to justify paying lower wages. Basically employers can say I don't need to give you a living wage because you can depend on the customers for charity.
Also don't forget it …

Posted

archive