In my last release of doGRT, I was proudly announcing the AUTO UPDATE feature. The feature which would let my user updates the schedule data without update the entire app from the App Store. I spent quite a bit of time to implement this feature, and put the schedule data on a place that I thought will never let me down - Github.
Seriously, it was working like a charm. At least during the time I was testing it. Unfortunately, the feature died before anyone can actually try it out.
Right before the schedule season change, Github put out a blog post saying "Goodbye, Uploads". At the main while, they replaced the Downloads Section with Tags and completely disabled the upload.
Even tho Github will keep the downloads page for 90 days, I cannot upload any new file to it. Cannot upload means I cannot tell my app "A newer version of schedule is available, go download it!!!!"
How sad is that`T_T
Github, can't you tell me this a bit earlier? or allow upload for extra 90 days? sigh
First, I wanna say sorry to doGRT users. If it is not the case, you guys would have the hot and fresh holiday schedule in your hand now. This situation should have been avoided if I have left enough flexibility in my implementation.
Of course, I'm going to fix it! Going to release a quick fix version with Winter schedule first.
The more feature I'm working on:
Feel free to @gregwym on twitter about your suggestions. Or you can email me through the feedback button in the app.
Merry Christmas,
Greg
Just finished my 3B term @ University of Waterloo. Learnt a lot, worked a lot...
Things that I was or is recently working on:
These should be able to keep me busy for my Summer, lol. Gotta stop playing around and start working now.
Wish everyone has a nice summer.
]]>btnx非常好的解决了这个问题, 而且还带GUI设置工具. 除了设置里没有Apply这个按钮, 让人有点琢磨不透它到底什么时候保存设置以外, 其他都还不错.
调整好设置以后记得点"Restart BTNX"来重启服务.
记一下安装使用时候碰到的各种问题.
在设置好鼠标以后还有点神器的问题, 就是btnx的设置不会屏蔽(override)掉这个按键的默认功能.
举个例子, 我把鼠标上原先的"前进/后退"设置成了"Ctrl+TAB/Ctrl+Shift+TAB", 当我在浏览器里按这个按钮的时候, 我不光会切换tab, 还会让页面前进/后退...很恶心是不是?
解决方法是, 编辑~/.Xmodmap把这几个按钮屏蔽掉.
比如button 8, 9是前进后退, 那就在~/.Xmodmap里写入
! Disable buttons 8 and 9
pointer = 1 2 3 4 5 6 7 0 0
参考资料:
http://ubuntuforums.org/showthread.php?t=918714
http://unix.stackexchange.com/questions/20550/how-to-disable-the-forward-back-buttons-on-my-mouse
主分区的迁移很容易, Mac OS X的磁盘工具是神器, 主分区直接恢复到新硬盘的对应分区即可. 但原机主已经装好了Lion(不知道是不是正版), Lion中增加了一个隐藏分区, 可以在系统崩溃的时候作为恢复分区. 所以希望能把隐藏分区完美移植到新硬盘上, 又保留原先Mac分区的数据, 只是扩大容量.
搜索了很多地方, 国内的各大论坛貌似都没有人研究过移植Lion恢复分区的问题, 最后还是在一个英文博客上找到了可行的方法. 翻译整理一下记录在这里, 方便碰到类似问题的朋友. 因为我自己操作的时候并没有截图, 所以直接使用原英文博客上的数据了.
在移植隐藏分区之前, 首先需要一个隐藏分区的范本.
个人认为, 应该尽量避免把正在运行的系统作为复制的范本
我的做法是, 在换硬盘之前, 先使用"Lion 恢复磁盘助理"制作一个可以boot的恢复U盘. 从U盘boot后, 把原硬盘的恢复分区作为范本. 这样也保证了原汁原味.
Lion 恢复磁盘助理下载地址: http://support.apple.com/kb/DL1433?viewlocale=zh_CN
将制作好的U盘插入电脑, 开机时按住Option选择U盘启动, 从U盘boot进入到Lion的恢复系统中.
将两块硬盘的其中一块放到USB硬盘盒中并接入电脑.
先进入"磁盘工具"把新硬盘整个都抹成"Mac OS扩展 (日志式)"
然后退出"磁盘工具"
点击"实用程序"->"终端" 进入Terminal
输入diskutil list, 列出系统中所有的磁盘和分区, 找出原盘和新盘的代码, 还有分区的编号.
例如:
/dev/disk0
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *128.0 GB disk0
1: EFI 209.7 MB disk0s1
2: Apple_HFS Macintosh HD 127.7 GB disk0s2
/dev/disk1
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *32.3 GB disk1
1: EFI 209.7 MB disk1s1
2: Apple_HFS OSX 31.4 GB disk1s2
3: Apple_Boot Recovery HD 650.0 MB disk1s3
其中, 记录下列信息
输入diskutil info /dev/disk0s2 (新硬盘的第二个分区)
Device Identifier: disk0s2
Device Node: /dev/disk0s2
Part of Whole: disk0
Device / Media Name: Macintosh HD
...
Total Size: 127.7 GB (127691702272 Bytes) (exactly 249397856 512-Byte-Blocks)
...
重点在于127691702272 Bytes, 你的硬盘不一定是这个大小, 记录下来
再输入diskutil info /dev/disk1s3
Device Identifier: disk1s3
Device Node: /dev/disk1s3
Part of Whole: disk1
Device / Media Name: Recovery HD
...
Total Size: 650.0 MB (650002432 Bytes) (exactly 1269536 512-Byte-Blocks)
...
重点是650002432 Bytes, 你的盘可能稍微有点不一样, 记录下来.
这样我们就收集齐了移植恢复分区的所有数据.
原来的隐藏分区是650MB, 但保险起见, 防止复制分区时少copy任意数据, 我们给隐藏分区分配700MB.
所以主分区的新大小为 127691702272 - 700 * 1000 * 1000 = 126991702272 Bytes (请根据你实际大小进行计算)
调整主分区的同时, 创建新分区. 注意输入正确的分区名称和大小!!!
-bash-3.2# diskutil resizeVolume /dev/disk0s2 126991702272B jhfs+ "Recovery HD" 650002432B
Started partitioning on disk0s2 Macintosh HD
Verifying the disk
Checking file system
Performing live verification
Checking Journaled HFS Plus volume
Checking extents overflow file
Checking catalog file
Checking multi-linked files
Checking catalog hierarchy
Checking extended attributes file
Checking volume bitmap
Checking volume information
The volume Macintosh HD appears to be OK
Resizing
Waiting for the disks to reappear
Formatting disk0s3 as Mac OS Extended (Journaled) with name Recovery HD
Initialized /dev/rdisk0s3 as a 621 MB HFS Plus volume with a 8192k journal
Mounting disk
Finished partitioning on disk0s2 Macintosh HD
/dev/disk0
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *128.0 GB disk0
1: EFI 209.7 MB disk0s1
2: Apple_HFS Macintosh HD 127.0 GB disk0s2
3: Apple_HFS Recovery HD 651.1 MB disk0s3
新建的分区大小比我们给的数大了些, 重新resize.
-bash-3.2# diskutil resizeVolume disk0s3 650002432B
Started partitioning on disk0s3 Recovery HD
Verifying the disk
Checking file system
Checking Journaled HFS Plus volume
Checking extents overflow file
Checking catalog file
Checking multi-linked files
Checking catalog hierarchy
Checking extended attributes file
Checking volume bitmap
Checking volume information
The volume Recovery HD appears to be OK
Resizing
Finished partitioning on disk0s3 Recovery HD
/dev/disk0
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *128.0 GB disk0
1: EFI 209.7 MB disk0s1
2: Apple_HFS Macintosh HD 127.0 GB disk0s2
3: Apple_HFS Recovery HD 650.0 MB disk0s3
这样就对了. 注: 这一步很重要, 如果隐藏分区大小不对, 最后会失败的!
将新创建的分区卸载(unmount).
然后用dd复制隐藏分区文件, 如下
-bash-3.2# dd if=/dev/disk1s3 of=/dev/disk0s3
1269536+0 records in
1269536+0 records out
650002432 bytes transferred in 185.538679 secs (3503326 bytes/sec)
dd会把原盘的隐藏分区里的内容, 一字不差的复制到新分区中, 不该失败.
-bash-3.2# asr adjust --target /dev/disk0s3 -settype "Apple_Boot"
Fsck /dev/disk0s3 ....10....20....30....40....50....60....70....80....90....100
Adjust completed successfully
运行完以后检查一下结果,
-bash-3.2# diskutil list
/dev/disk0
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *128.0 GB disk0
1: EFI 209.7 MB disk0s1
2: Apple_HFS Macintosh HD 127.0 GB disk0s2
3: Apple_Boot Recovery HD 650.0 MB disk0s3
/dev/disk1
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *32.3 GB disk1
1: EFI 209.7 MB disk1s1
2: Apple_HFS OSX 31.4 GB disk1s2
3: Apple_Boot Recovery HD 650.0 MB disk1s3
新硬盘上的Recovery HD现在应该已经是Apple_Boot类型了.
之后通过"磁盘工具"将老硬盘的Mac分区恢复到新硬盘的Mac分区, 然后在开机时就可以通过按住option键boot进新硬盘中的系统和恢复分区了.
进入系统后注意设置启动磁盘, 不然再次重启时候还需要按option键.
完毕
参考源:
http://www.dmitry-dulepov.com/2011/09/mac-recovery-partion-revisited.html
Windows在
%USERPROFILE%\Local Settings\Application Data\Google\Chrome\User Data
Mac OS X在
~/Library/Application Support/Google/Chrome/
Linux在
$HOME/?.config/google-chrome
用编辑器打开Local State这个文件, 找到以下两行
"last_known_googleurl": "http://www.google.***/",
"last_prompted_googleurl": "http://www.google.***/",
将它们改为:
"last_known_googleurl": "http://www.google.com/",
"last_prompted_googleurl": "http://www.google.com/",
打开Chrome以后随便搜索个东西...他会提示你正在使用google.com, 要不要更换到google.***|.
选择继续使用, 大功告成! 嘿嘿
Db2=>CONNECT TO db_name
Db2=>EXPORT TO absolute_file_path OF DEL SELECT * FROM "table_name"
Db2=>IMPORT FROM absolute_file_path OF DEL INSERT_UPDATE INTO "table_name"
]]>写的是个Twitter-like Web Service的客户端, 网页端在这里
https://hci-courses.cs.uwaterloo.ca/channelw/
不是开放注册, 但可以邀请...有人想玩玩看的话, 可以留言回复哈`
Post上来得瑟一下
Java运行文件下载:
mikrocalendar.jar
截图如下:
在设备属性中设置"分配数据空间",
启动虚拟机, 打开Terminal
sudo mkdir /mnt/share
sudo mount -t vboxsf <数据空间名称> /mnt/share
之后就可以在/mnt/share里访问主机的文件了
注: /mnt/是Ubuntu的默认mount目录, 并不是所有Linux都是如此, 请自行注意
卸载这个数据空间, 你可以选择重启, 或者使用以下命令
sudo umount -f /mnt/shared
如果需要每次打开虚拟机的时候都自动加载这个, 可以编辑/etc/fstab
sudo vim /etc/fstab
# 添加如下一行内容
<数据空间名称> /mnt/share vboxsf rw,gid=100,uid=1000,auto 0 0
]]>最后来介绍下我的最终选择:
QuickWeb一开始并不在我的选择范围内, 甚至根本不知道这个ISP, 因为几个大的VPS博客都没有特别推荐过这个ISP. 后来在Neal的博客发现他在做QuickWeb的代购, 才发现这也是一家在美国蛮有实力的IPS. (之所以说有实力是因为他们在美国五个大的数据中心都有机房)
最后入手的这个是$35.88/年的plan, 平摊下来一月只要$3, Neal主推的就是这个plan.
他自己的blog就搭在这个plan的VPS上, 访问速度很好, 而且看底下评论的反响普遍不错, 经Google四处查证以后, 决定还是下手试试看. Paypal付款给Neal以后, 主机即时开通.
规格:
OpenVZ/SolusVM
Intel(R) Xeon(R) CPU X3440 @ 2.53GHz, 单核
256M/384M突发
10G硬盘, 速度测试平均22M/s
美国凤凰城机房10Mbit带宽(Phoenix/LA) 250G/m流量
+$5可升级100Mbit
+$10可升级1000Mbit
到目前为止, 对这个主机还是很满意的, 速度和性能方面都很不错. LNMP只用了20分钟就装好了.
有需求的朋友可以联系Neal代购, http://neal.im/webhosting/