手机浏览 RSS 2.0 订阅 膘叔的简单人生 , 腾讯云RDS购买 | 超便宜的Vultr , 注册 | 登陆
浏览模式: 标准 | 列表2024年09月的文章

收到linode的通知,顺便记录一下

这两封邮件来自linode,说实话,觉得linode真心不错。。

比如这一封:
We are currently aware of an issue with the host that your Linode resides on (tokyo49). This issue requires a reboot to resolve. We do apologize for any inconvenience this issue may cause. Your patience and understanding is greatly appreciated. Please do not hesitate to contact us if you have any questions or concerns.

然后过了将近10分钟左右 :
The host that your Linode resides on has been successfully rebooted. Your Linode will return to its last state shortly (running or powered off). There is no need to issue boot jobs for your Linode at this time. Thank you for your patience and understanding. Please feel free to update this ticket in the event that you have any additional questions or concerns about this matter.

于是,linode的管理邮件又自动发来:
Hello xxxxxxx! The following activity has recently occurred:

* linode??????- (7659786) Host initiated restart - Completed Wed, 16 May 2012 04:23:49 GMT
* linode?????- (7659950) Lassie initiated boot - Failed Wed, 16 May 2012 04:23:58 GMT

This is a new feature.  You can change your notification settings via https://manager.linode.com/profile.
果然,这些功能是真心不错啊。如果以后有短信息发送就好了。
国内的VPS有哪个有类似功能的?不过国内我是不想用了,NND,备案备案,备死人的案。

Tags: linode

iPhone导入Google通讯录

老婆用的是palm手机,最近因为摔了(?好象是),导致打电话的时候听不到声音,但是用耳线可以,因为它的电话比较多,所以就帮她买了个iphone4s,之所以买这款手机而不是买android或者wp之类的,是因为,这款手机相对比较简单,比如装软件,删软件。不象安卓还得进入软件管理器里才能进行删除。太麻烦了。

新机入手,第一件事就是剪卡,随手一剪,插入后提示无SIM卡。再到网上查了一下,原来剪卡不是说把芯片剪出来就完事了,主要是要对准中心线,于是对着图片,直接下手一刀,把SIM卡的铜片剪掉一点,再次插入,正常了。哈哈。哥还是很厉害的

然后就是导入通讯录了。不得不说,虽然palm没落了,但是它的一些设计理念还不错的,比如它就支持google通讯录,于是这次换成iphone后,通讯录就不是难事了。

原来我以为在邮件里直接绑定gmail就OK了,但事实告诉我,这是不行的。嗯,网上都说了,还是用exchange吧
于是在exchange里输入了gmail的帐号,点击下一步,会让我输入服务器,这时候输入:m.google.com,再下一步就OK了。

黑黑,通讯录就这么导回来了。轻轻松松啊。

Tags: iphone, google, contacts, palm

Linux命令行下面一个有趣的小命令(tested in ubuntu)

在微博的#SAE技术分享# 看到一些有意思的东西,比如这一篇的标题,嗯,确实是有一些奇怪的玩意。
比如,ubuntu下的apt-get moo,居然出来了这样的玩意,你能相信吗?》

XML/HTML代码
  1. root@webserver:/# apt-get moo  
  2.          (__)   
  3.          (oo)   
  4.    /------\/   
  5.   / |    ||     
  6.  *  /\---/\   
  7.     ~~   ~~     
  8. ...."Have you mooed today?"...  

好一只羊?还有一些其他的命令,比如yes,好象记得这个命令是专门用来处理自动化安装的吧?即自动输入y,N个,直到安装完成,如果没有安装,就在屏幕上拼命的输出。。。
还有一些其他的。。比如banner,会将你输入的字符用##打印出来,比如我这个:

XML/HTML代码
  1. root@webserver:/# banner bannertest  
  2.   
  3.  #####     ##    #    #  #    #  ######  #####     
  4.  #    #   #  #   ##   #  ##   #  #       #    #    
  5.  #####   #    #  # #  #  # #  #  #####   #    #    
  6.  #    #  ######  #  # #  #  # #  #       #####      
  7.  #    #  #    #  #   ##  #   ##  #       #   #     
  8.  #####   #    #  #    #  #    #  ######  #    #  

,再比如fortune,这个函数很有意思,既能学英文又可以很好玩,该网页上这么显示了:

XML/HTML代码
  1. orange@orange-desktop:~$ fortune  
  2. Q:How many IBM types does it take to change a light bulb?  
  3. A:Fifteen. One to do it, and fourteen to write document number  
  4.   GC7500439-0001, Multitasking Incandescent Source System Facility,  
  5.   of which 10% of the pages state only "This page intentionally  
  6.   left blank", and 20% of the definitions are of the form "A:.....  
  7.   consists of sequences of non-blank characters separated by blanks".  

想看更多?到这里看一下吧:http://www.linuxidc.com/Linux/2007-05/3784.htm,不是每个linuxer都是闷瓜。

Tags: sae, ubuntu, linux

继续几点注意事项

命令行和WEB运行程序中遇到的问题就是,这两个方式生成的图片目录权限不一样,目录命令行,如果以xxx用户登录,生成的目录组就是xxx,而WEB因为指定了apache或者nginx的用户组(如:www-data),生成出来的权限就是以www-data为主,如果需要读取和处理Xxx目录下的图片等,很可能会遇到不能读取或者没有权限的问题
因此,一个办法是:su www -c 'xxxx'这种指定权限的方式来处理

还有一个办法:
suPHP is a tool for executing PHP scripts with the permissions of their owners. It consists of an Apache module (mod_suphp) and a setuid root binary (suphp)
嗯看一下:
suPHP
现在就可以了?但总是不爽。没有什么更好的办法 .。。

小笔记

最近在与IOS交互的时候,是由weiview里改变location.href来使得页面的URL产生变化,然后由IOS来截取这些URL信息以达到截获消息的机制。
有人推荐了:https://github.com/marcuswestin/WebViewJavascriptBridge
看了一下,其实也都差不多一样,不过看到FlipBoard的代码中,也还是用location来改变的,但是它也有一个机制,当你用网页打开时,并不会触发Location的变更,所以我在想是否有一种相对比较好的机制,能够使得数据的交互更方便。
抛开上面的例子以及flipboard,这两种其实最终都是用addEventListener来监听和传递,但毕竟要和客户端交互,除了URL其他用什么呢?
我随便想了想,不知道是否正确:
1、localStorage,客户端定时检查localStoage的信息
2、cookie,改变cookie值以获取改变后的值
3、利用Safari的特性,捕获console.log的数据

cookie应该是肯定可以,但是太慢了吧?第三个,有可能,但没有测试过

Tags: ios