Soft&Skills

一个时区引发的血案 [timezone] [ubuntu] [cacti]

2013-06-08. Category & Tags: Leading, Soft&Skills Leading, Soft&Skills

拿cacti试着玩,和mrtg一起装的。 第一天(昨天)装上就睡觉了,今天起来接着玩。 发现自己新建的数据所产生的图表和rrd文件显示不出来数据,总是 NaN, copy其他已经有的文件替换新文件就可以显示,当然,数据还是老文件的。 然后,发现copy的rrd文件生成的图和原rrd一致,即使过了半小时也是一样的,难道从同一个数据源获取的信息被写到不同的rrd文件?md5检查证明这个想法是错误的。 还有个很诡异的问题,早晨我特地用bc算了一个很大的数,但是他显示的cpu load最高的时候却是在中午,我都怀疑有人在我吃饭的时候黑了我的服务器? 把cacti的dev模式打开,详细检查log。没发现任何报错,update的rrd文件也没报错。我汗~~~灵异事件。。。 突然发现写入rrd文件的时间戳貌似和生成图表用的时间戳存在巨大差异,一对比,差4小时~!!! 然后就想起来给这台服务器刚换过时区,应该是这个问题了。看来只替换时区文件是不行的 。。。 所以我: dpkg-reconfigure tzdata && reboot 。。。 很难说清到底哪些程序需要重启,干脆整机重启吧,几秒的事儿~ //win server 就2了,几分钟起来就不错了。 这里还有另一篇文章:(我没试过) http://www.wikihow.com/Change-the-Timezone-in-Linux

Vim In Case Of

2013-05-01. Category & Tags: Soft&Skills Soft&Skills

Language Support # scala # mkdir -p ~/.vim/{ftdetect,indent,syntax} && \ for d in ftdetect indent syntax ; && \ do wget -O ~/.vim/$d/scala.vim https://raw.githubusercontent.com/derekwyatt/vim-scala/master/$d/scala.vim; && \ done ref Fold # zr //unfold one level zR //unfold all levels zm //fold one level zM //fold all levels Buffer # See also ‘vim 只删除,不剪切’.2/16/13434/).

那些缩略词们,那些词汇们. abbr abbreviation

2013-04-20. Category & Tags: Soft&Skills Soft&Skills

理解记忆岂不更好~~ a: Anchor; href: Http REFerence; ol: Ordered List; ul: Un-ordered List; tr: Table Row; thead: Table Head; th: Table Head-data; td: Table Data; colspan: COLumn SPAN; rel: relationship; <em>: emphasis; font-size: 0.5em: equivalent measurement. adj. [印]全身长(或宽)的(印刷符号). Courier: 急差; Cursive: 草书; palette: 调色板; serif: 衬线, 例如TimesNewRoman的字符们; sans: = without; 其他很熟悉的: css: Cascading Style Sheets;

诡异的无线路由掉线 [wireless] [router] [arp]

2013-04-08. Category & Tags: Leading, Life, Soft&amp;Skills Leading, Life, Soft&amp;Skills

最近家里用本本无线, 但是总掉线, 刚开始以为是路由问题, 重启, 好了, 但是太麻烦, 而且很频繁. 后来偶然发现本本掉线之后 (但是显示还有连接), 手动重连即可. 问题是这个毛病太频繁了, 平时在学校没事儿, 回家之后很烦. 受不了, 于是wireshark, 发现路由很奇怪地不回答arp询问, 导致动态arp的cache过期之后本本找不到gateway的mac地址, 无法送出数据包. 但是此时尚可以接收数据包, 这也可能是为什么skype或者其他云服务之类发现"自己"off-line会滞后于错误的实际发生时间. 虽然不知道是不是路由的问题 (已经从dd-wrt返回出场状态, 不过依然不能解决问题), 总有办法bypass, 就是static arp. xp中使用 arp -s 192.168.1.1 68-7f-74-b0-f8-ab 可以设置静态arp, 但是在windows 7却得到 “The ARP entry addition failed: Access is denied.” ms官方论坛没有细说, 但给出netsh方案. stackoverflow 给出: netsh interface ip add neighbors <interface-name> <peer-ip> <peer-mac> 例如: netsh interface ip add neighbors “Wireless Network Connection” 192.168.1.1 69-7f-ff-bf-f8-gb 但是错误提示: cannot load ipmontr.dll …. 我了个去 … ...

rsync

2013-03-21. Category & Tags: Soft&amp;Skills Soft&amp;Skills

Usage: # general usage: rsync -avhuzP /path/to/src_folder/ username@serverIp:/home/username/path/to/dest_folder/ # other usages: alias rsyncBackupCompareAttr='rsync -avhuz --progress --delete --log-file=rsyncBackupLog.txt' alias rsyncBackupIgnoreAttr='rsync -avhuz --no-perms --no-owner --no-group --progress --delete --log-file=rsyncBackupLog-$(date -d "today" +"%Y%m%d_%H%M%S").log.txt' alias rsyncBackupProgressIgnoreAttr='rsync -ahuz -e 'ssh -p <remote_port>' --exclude "@eaDir" --exclude ".SynologyWorkingDirectory" --exclude ".stfolder" --info=progress2 --no-perms --no-owner --no-group --delete --log-file=rsyncBackupLog-$(date -d "today" +"%Y%m%d_%H%M%S").log.txt' options: -a: archive mode is -rlptgoD (no -A,-X,-U,-N,-H). -v: == --verbose. -h: human-readable. -u: transfer only if src has (newer timestamp) or (equal timestamp & different size). ...

Chrome In Case Of

2012-11-17. Category & Tags: Soft&amp;Skills Soft&amp;Skills

Change/Modify/Reset Translate Config # Modify file: %USERPROFILE%\AppData\Local\Google\Chrome\User Data\Default\Preferences Now can be done in Chrome settings. Clear DNS Host Cache # chrome://net-internals/#dns

MicroSoft (MS) Office Word Citation/Bibliography - How To

2012-11-07. Category & Tags: Soft&amp;Skills Soft&amp;Skills, LaTex, BibLatex, Citation, Paper, Writing, Research

NOTE: this article is dated, please use Zotero plugins. 1. Import Resources # “over-write”, if asked. 2. Insert Citation # 3. Append Bibliography # 4. Known Issues # 4.1. Delete Extra Items # MS will not delete the extra items (not cited items) automatically. Make sure that your thesis is the final version, then you could delete the extra bib items. References > Manage > Select (on the right hand) > Delete. ...