Skip to main content

Posts

Misc Notes 20130702

- To remove the 'new release available' message, remove the file /etc/update-motd.d/91-release-upgrade http://blog.koppi.me/2011/12/howto-disable-new-release-available-on-ubuntu-11-10/ - To remove unused language packs from Windows 8, run `lpksetup` http://answers.microsoft.com/en-us/windows/forum/windows_7-windows_programs/how-to-uninstall-extra-language-packs-from-windows/9ac2194d-1665-498d-8571-32e4cce6efa9 - If Cygwin X server crashed with `-multiwindow` on HD4000 graphics card, try updating the graphics card driver http://serverfault.com/questions/488306/cygwin-x-crashing-on-multiwindow-option/488556#488556 - halt vs poweroff: halt does not send the acpi power off signal http://unix.stackexchange.com/questions/42572/halt-and-poweroff-options-for-shutdown-command - MyPaint picker offset on windows 64bit with high dpi - Also how to set the high dpi compatibility setting for 64bit programs http://forum.intilinux.com/mypaint-help-and-tips/color-pick...

Notes 20130505

'tc' and 'netem' allow you to simulate some network environments http://www.linuxfoundation.org/collaborate/workgroups/networking/netem#Delay_distribution For example, I can delay every packet for 1s, such that in some case I can cheat in games. Google Chrome complains about "profile cannot be opened correctly": remove the 'web data' folder in the config dir http://www.fourleaftechnology.com/index.php/General/google-chrome-profile-could-not-be-opened-correctly-error.html To remove PDF password with gs http://www.cyberciti.biz/faq/removing-password-from-pdf-on-linux/ gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=unencrypted.pdf -c .setpdfwrite -f encrypted.pdf IE10 would ignore the `word-spacing` CSS rule if the width for the space char is 0, in a TTF font. Is it a bug of IE?

杂记 20130505

使用tc + netem可以模拟一些网络环境 http://www.linuxfoundation.org/collaborate/workgroups/networking/netem#Delay_distribution 比如我可以让每个包都延迟1秒,某些情况下玩游戏还可以作弊 Google Chrome说Profile无法正确打开: 把配置目录里的'Web Data'目录干掉 http://www.fourleaftechnology.com/index.php/General/google-chrome-profile-could-not-be-opened-correctly-error.html 用gs去除PDF的密码: http://www.cyberciti.biz/faq/removing-password-from-pdf-on-linux/ gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=unencrypted.pdf -c .setpdfwrite -f encrypted.pdf IE10下如果TTF字体的空格宽度是0,就会无视word-spacing的css规则,不知道是不是IE的bug。

Misc 20130401

To reset all shortcut definitions in evince, run rm ~/.config/evince/accels GCC would complain if you define a variable without actually using it. To silience it, use (void)var; DNS is not working in VirtualBox: Run VBoxManage modifyvm "VM name" --natdnshostresolver1 on Ref   A useful link talking about ravlue reference in C++11 http://thbecker.net/articles/rvalue_references/section_01.html   To clear disk cache in Linux: Run sudo sh -c 'echo 3 > /proc/sys/vm/drop_caches' Ref  "screen-256color not found": Run infocmp xterm-256color > screen-256color.ti on a machine without this error, copy the file to the target machine and then run tic screen-256color.ti Ref Just switch to fcitx from ibus. I like a theme called 'anran'. If fcitx cannot follow the cursor on Firefox, turn on preedit, as said in the official wiki. Just played with a vim plugin called youcompleteme, for C++ autocomplete, which is quite powerful. Also I installed vund...

杂记 20130401

之前evince的快捷键乱套了,使用 rm ~/.config/evince/accels 复位 定义了变量var又不用的话,gcc会报warning"unused variable",解法是 (void)var; VirtualBox中DNS不工作:运行 VBoxManage modifyvm "VM name" --natdnshostresolver1 on Ref   一个讲c++11右值引用的link: http://thbecker.net/articles/rvalue_references/section_01.html   Linux清除disk cache: sudo sh -c 'echo 3 > /proc/sys/vm/drop_caches' Ref  遇到错误screen-256color not found需要支持新的终端类型:找一台支持screen-256color的机器执行 infocmp xterm-256color > screen-256color.ti 把文件拷贝到目标机器后执行 tic screen-256color.ti Ref  最近从ibus换到了fcitx,起初是由于sogou发布了,不过后来还是卸掉了。anran主题不错。fcitx在firefox中光标跟随有点问题,按官方wiki说法打开preedit后就没事了。  最近在vim里折腾youcompleteme这个补全插件,挺好用。顺便也装了vundle来管理插件,很不错  vim更新.vimrc后想直接应用,执行 so %