STUDY WHILE YOU ARE BORING


  • 首頁

  • 搜索

  • 技术

  • Tags

  • 关于我

MISSIONCONTROL 显示器单独空间的区别

發表於 December 18, 2017   |   评论

https://scomper.me/macos/missioncontrol-xian-shi-qi-dan-du-kong-jian-de-qu-bie

CentOS 6.4 - Install SSH2 extension for PHP

發表於 September 6, 2017   |   评论

CentOS 6.4 - Install SSH2 extension for PHP

Install the necessary packages before you can build/install ssh2 extension

yum install gcc php-devel php-pear libssh2 libssh2-devel make

Install the extension, (hit enter for autodetect when it prompts you)

pecl install -f ssh2

Once the install is completed, you just have to tell PHP to load the extension when it boots.

echo extension=ssh2.so > /etc/php.d/ssh2.ini

Restart your webserver and test to see if the changes took effect.

service httpd restart

You can check it installed with the following command

php -m | grep ssh2

重置Launchpad

發表於 July 15, 2017   |   评论
defaults write com.apple.dock ResetLaunchPad -bool true; killall Dock

公钥,私钥和数字签名这样最好理解

發表於 May 12, 2017   |   评论

一、公钥加密
假设一下,我找了两个数字,一个是1,一个是2。我喜欢2这个数字,就保留起来,不告诉你们(私钥),然后我告诉大家,1是我的公钥。
我有一个文件,不能让别人看,我就用1加密了。别人找到了这个文件,但是他不知道2就是解密的私钥啊,所以他解不开,只有我可以用
数字2,就是我的私钥,来解密。这样我就可以保护数据了。
我的好朋友x用我的公钥1加密了字符a,加密后成了b,放在网上。别人偷到了这个文件,但是别人解不开,因为别人不知道2就是我的私钥,
只有我才能解密,解密后就得到a。这样,我们就可以传送加密的数据了。






- 阅读剩余部分 -

让spotlight 显示中英翻译

發表於 May 8, 2017   |   评论

MacOS 系统下面,如果spotlight 搜索中文内容,字典默认显示的是字词的中文解析。如下:
105569BF-5866-407D-A888-F817DCBAE72D.png


- 阅读剩余部分 -

CSS 字体(例如font-awesome),子域名不能正确显示

發表於 December 15, 2016   |   评论

症状

原来能正常显示的情况下,将js、css、图片文件改为子域名访问,方便cdn加速。切换之后一切正常,但是font-awesome的图片没有正确显示,全部显示框框

原因

因为浏览器的安全规则,虽然是子域名,但是css跨域载入字体文件的时候被浏览器拦截,导致了显示不正常。

- 阅读剩余部分 -

Say Yes 吉他solo

發表於 July 5, 2015   |   评论


在《砸门结婚吧》最后的最后一首 Tarantella 之后,就是这段优美的 Say Yes Solo

Selenium IDE HOWTO & 建立的TestSuite如何复用到多个不同的环境?

發表於 June 25, 2015   |   评论

经过几个项目的洗礼,团队在开发系统上基本上不存在太大的问题,总结一下问题:

  • UI上的问题比较难发现
  • 很多时候修改了其中一个部分,为什么会造成其他页面的异常
  • coder做互测的时候只是测试了具体的点,也不想花大量的时间去每个页面看看
  • 怎么样才能让测试员的劳动成果,coder做互测的时候也能复用

基于上面几个问题,萌发了研究测试工具的想法。

- 阅读剩余部分 -

nodejs/phonegap 安装插件慢?配置淘宝npm源

發表於 June 20, 2015   |   评论

在天朝内总有种神秘的力量让程序员们苦不堪然,很多先进的技术平台无法正常、快速的访问,例如:Google、Github……

今天的主角是 PhoneGap,周末无事,作为一个全「贱」客,闲着无聊想做一个手机的APP,带扫描二维码的功能,然后就没有然后了,现在满大街都是条码,做个APP,肯定要先搞定条码扫描的功能。

Java不懂、Object-C不认识,更不用说Swift了。想到了无所不能的Javascript,果然找到了PhoneGap。

运行环境

OSX 10.10
Iphone6 64G

安装PhoneGap

马上遇到问题了,直接用 npm install phonegap 爆慢,而且还一直中断,我估计肯定又是神秘组织的神秘力量在作怪。既然是包管理,国内肯定应该有镜像源,百度了一下,发现了https://npm.taobao.org/ ,很不错,完全同步,不会出现缺胳膊少腿的情况,速度也非常快。淘宝最近几年的确做了很多好事。

根据介绍,安装好了cnpm,发现几个缺陷

  • 一定要用 cnpm 替代 npm命令操作
  • 不能用 cnpm -g 安装全局组件
  • 其他引用了npm命令的工具无法使用此源,例如 phonegap plugin add xxx

究其原因,是因为cnpm 只是 npm的一个alias(npm --registry=https://registry.npm.taobao.org),比较浅的植入方式。这个还不能直接解决我的问题。

尝试修改 vi ~/.npmrc,加入一下代码

registry = https://registry.npm.taobao.org

搞定,全局使用了淘宝的源,我又能正常的好好学习了。晚安

在网页上,让回车键(enter)模拟Tab键的效果

發表於 June 4, 2015   |   评论

比百度各种搜索出来的方法都要好用

$('body').on('keydown', 'input, select', function(e) {
    return enter2tab(this,e);
});
function enter2tab(obj,e){
    var self = $(obj)
    , form = self.parents('form:eq(0)')
    , focusable
    , next
    ;
  if (e.keyCode == 13) {
      focusable = form.find('input,select,button').filter(':visible');
      next = focusable.eq(focusable.index(obj)+1);
      if (next.length) {
          next.focus();
      } else {
          form.submit();
      }
      return false;
  }
}
  1. « 前一页
  2. 1
  3. 2
  4. 3
  5. 4
  6. 5
  7. 6
  8. 后一页 »

钜添

54 文章
2 分類
1 页面
GitHub 日记技术
php apache centos macos mysql https shadowsocks mac 微信 ups svn javascript outline accesskey Chrome Extension letsencrypt ssl free certification certbo wildcard renew cloudflare pgsql 归档 binlog isset array_key_exists redmine axure
© 2022 钜添   |   文章 RSS     |  登录
由 Typecho 强力驱动
主題 - NexT
Send message encrypted and private - Msg2
Build your Under Construction Page without hosting - UnderConstruct.IO