Skip to main content

Posts

Notes

surface pro stylus calibration http://www.reddit.com/r/Surface/comments/18cd96/improved_pen_accuracy_with_a_100_point/ http://www.reddit.com/r/Surface/comments/1cy8hn/this_pen_calibration_is_so_far_the_best_solution/ Search for 'UserLinearityData' in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet and remove 'devicekind=pen'   merge tool: meld   linux虚拟机的硬盘大小不够,扩容以后又调整了分区,于是grub就不能进入了。启动说unknown filesystem然后进入grub rescue。 根据 http://askubuntu.com/questions/142300/fixing-grub-error-error-unknown-filesystem 在grub rescue输入 set prefix=(hd0,5)/boot/grub insmod linux linux (hd0,5)/boot/vmlinuz-3.11.0-15-generic initrd (hd0,5)/boot/initrd.img-3.11.0-15-generic boot 然后grub这步正常了,但是会卡到initramfs/busybox,说找不到init 于是在linux命令后面加上root=/dev/sda5就可以正常进入系统 进入系统以后赶紧用grub-install和update-initramfs再修正一下。

Converting synced C/C++ into asynced JavaScript

Emscripten is a C/C++ -> LLVM -> JavaScript compiler. It's useful and interesting, but one of its biggest limitations is about the sync/async model: JavaScript is single-threaded event-driven languages, therefore you cannot do a sleep() in the hope of receiving and processing extra events. Demo First of all, please enjoy this demo , on which I really spent some time. tl;dr Motivation: to make `sleep` and other similar functions actually work in our Runtime, without lots of labor work porting the C/C++ code I actually made it worked  `sync->async` is doable and I think it's not too hard - there are already implementations for JS I think this is a feature that cannot be supported by merely an external library Does it fit emscripten? Or is it possible to write a plugin for emscripten? Demo explained(?) The demo is basically a stop-time animation: //draw something //wait for some while //draw something else //wait... You can verify this ...

杂记 2013.10.23

png优化工具:pngnq(有损)和 pngcrush(无损) ubuntu gnome 13.10的input source里找不到输入法:手动修改dconf键值 org.gnome.desktop.input-sources.sources ,在数组里添加 ('ibus','sunpinyin') 和 ('ibus', 'anthy') 。 但是mozc似乎不行,原因不明。观望。 mozc在dconf里要打('ibus', 'mozc-jp')

Ubuntu 下 mount windows 共享目录

一般来说遇到标题所述问题我马上会想到smbfs,不过好久不用,最近发现smbfs已经没有了,取而代之的是cifs,于是命令大约是 sudo mount -t cifs //hostname//folder /localfolder -o user=username 不过总是报 Input/ouput error google了一阵,有的说加上 sec=ntlm 有的说加 iocharset=utf8 ,不过都没用。其中加了后者还会出 Can not access a needed shared library 的错误。根据 http://wiki.openwrt.org/doc/howto/cifs.client    和 https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1067681 , 安装了linux-image-extra-***的包以后才可以,但是mount还是不行。(我的linux是在虚拟器,装的最小内核linux-virtual) 于是尝试了一下smbclient,也是报错: tree connect failed: NT_STATUS_INSUFF_SERVER_RESOURCES 根据 http://klebom.net/melazy/tricks/ 查到是IRPStackSize过小的问题, 我在windows也确实查到了事件: Log Name: System Source: srv Date: 2013-10-20 14:08:29 Event ID: 2011 Task Category: None Level: Error Keywords: Classic User: N/A Computer: *** Description: The server's configuration parameter "irpstacksize" is too small for the server to use a local device. Please increase the value of this parameter. ...

Install Ubuntu 13.10 via Grub Legacy

I need to install Ubuntu 13.10 into an old Linux machine. The BIOS has been locked such that I cannot boot from CD or USB drives. The machine has grub 0.97 and a pretty old CentOS installed on it, which I've got the root access, so I decided to try to load the ubuntu iso file with it. Based on https://help.ubuntu.com/community/Installation/FromLinux I tried to enter the grub commands there, but then it failed with error like this: stdin: error 0 /init: line 7: can't open /dev/sr0: No medium found After spending hours in searching and trying, I found this url: http://askubuntu.com/questions/47076/usb-boot-problems which solved the problem for me. The full commands I used are: root (hd1,0) kernel /casper/vmlinuz.efi boot=casper live-media-path=/casper/ ignore_uuid initrd /casper/initrd.lz This link http://manpages.ubuntu.com/manpages/karmic/man7/casper.7.html describes the parameters for casper

Screen Color Calibration

configure softwares gimp: edit->preferences->color management->try to use system monitor profile firefox: about:config ->  gfx.color_management.mode -> 1   test pages http://www.gballard.net/photoshop/srgb_wide_gamut.html http://photographylife.com/is-your-browser-color-managed I bought a spyder 4 express and would like to try dispcalGUI on my surface pro, so I have to install Argyll CMS's driver, which is not signed. For windows 8, one option to disable driver signature enforcement is through "advanced startup settings", which lists a few options after a restart, and you can press f7 or 7 to disable it. However for my surface pro, it refused to recognize my keyboard, no matter it is a bluebooth keyboard, a usb wireless keyboard or a normal usb keyboard. I guess a touch/type cover might work, but I don't have one. Another option is to enable test mode (bcdedit -set testsigning on), before which you should also disabl...

杂记 20130821

一直纠结是用中文写还是英文写还是都写,随心情好了。 Windows 8 FileHistory 不能指定外置硬盘 参考: http://answers.microsoft.com/en-us/windows/forum/windows_8-hardware/windows-8-file-history-does-not-recognize-my/361a527b-d35b-4753-b4a6-3ccff738ff62?page=2 - 确定该硬盘没有被加入任何library - 删除 C:\Users\USERNAME\AppData\Local\Microsoft\Windows\File History 给我妹家里配无线路由,主要是希望用一个小路由增强一个大路由(外接adsl)的信号 一开始给小路由设的repeater模式,但是不太好使,于是用ap模式+开启wds,然后小路由自动禁用了dhcp。这时在小路由的信号内手动设置ip和dns可以上网。最后把小路由dhcp打开,然后把两个路由分配的ip段分开就可以了。 两个路由的ssid,信道和加密方式都应该相同。 按理说WDS应该可以的,但是似乎小路由不太行。 利用PuttyGen声称公钥然后让服务器信任 参考: http://www.dailyiteration.com/howto-passwordless-ssh-authentication-with-putty/ 主要是需要用sshkeygen -i -f 转一下格式 Gmail里拖拽图片附件,如果拖到正文,就会添加成inline image;如果拖到下方工具栏上,就会添加成附件 参考: http://lifehacker.com/add-images-as-attachments-via-drag-and-drop-in-gmail-561870021