07 2018 档案
摘要:https://serverfault.com/questions/587696/how-to-restart-php-fpm-from-cron 我也遇到了这个问题,想用cron 来启动php-fpm进程(当检测到php-fpm 进程挂掉的时候) 把service php5.6-fpm 这句改为
阅读全文
摘要:Atong介绍的这个工具,挺好用的。supervise 官方网站: https://cr.yp.to/daemontools.html cd /data/test cat test.c cat run 执行命令 svstat /data/test,结果如下: pstree -p: 自动监控并重启服务
阅读全文
摘要:原文: http://man.linuxde.net/tee tee命令用于将数据重定向到文件,另一方面还可以提供一份重定向数据的副本作为后续命令的stdin。简单的说就是把数据重定向到给定文件和屏幕上。 存在缓存机制,每1024个字节将输出一次。若从管道接收输入数据,应该是缓冲区满,才将数据转存到
阅读全文
摘要:修改ubuntu的启动级别 runlevel 37down voteaccepted 37down voteaccepted Ubuntu 16.04 uses systemd instead of init and hence the concept of runlevels is replace
阅读全文
摘要:原文: https://www.jianshu.com/p/2e03255cfabb ubuntu配置开机自动启动服务 这里需要特别说明的是,Ubuntu系统下没有RedHat系统下的chkconfig命令。 但Ubuntu有一个类似的命令: sysv-rc-conf。 通过apt-get命令完成s
阅读全文
摘要:原文: https://www.jb51.net/LINUXjishu/407463.html 有多种方式可以查看你目前在使用什么 shell,最简单的方法就是通过使用 shell 的特殊参数。 其一,一个名为 "$$" 的特殊参数 表示当前你正在运行的 shell 实例的 PID。此参数是只读的,
阅读全文
摘要:https://stackoverflow.com/questions/18093928/what-does-could-not-find-or-load-main-class-mean A common problem that new Java developers experience is
阅读全文
摘要:https://stackoverflow.com/questions/5258159/how-to-make-an-executable-jar-file 文件的路径如下: 直接vim myjar.jar 打开jar包,查看里面的内容: MANIFEST.MF文件的内容: Here it is i
阅读全文
摘要:原文: https://kb.cnblogs.com/page/598963/ 蓦然回首自己做软件开发这个行业已经十年了,这十年中我获得了很多,技术能力、培训、出国、大公司的经历,还有很多很好的朋友。但再仔细一想,这十年中我至少浪费了五年时间,这五年可以足够让自己成长为一个优秀的程序员,可惜我错过了
阅读全文
摘要:原文:http://lihaoquan.me/2016/11/5/golang-byteorder.html 这个人的博客写的不错,品质也比较高。 我应该也要有这种精神,这种态度。深入到计算机的世界中去。也是一种快乐。 go 最近在看nsq的源码时候,发现它处理message的时候,都会采用字节序进
阅读全文
摘要:原文: https://blog.golang.org/go-maps-in-action Introduction One of the most useful data structures in computer science is the hash table. Many hash tab
阅读全文
摘要:早上同事问我个问题,angular 的表单验证有没有啥第三方库可以用? 这个问题,我想了下,之前我做的表单验证好像也没用到第三方的库来验证,直接用angular 内置的 directive 就可以搞定了。ng-minlength, ng-pattern ,ng-maxlength .. xxForm
阅读全文
摘要:一、多线程定义: 所谓的多线程,multithreading。有多线程能力的计算机因有硬件支持而能够在同一时间执行多于一个线程,进而提升整体处理性能。具有这种能力的系统包括对称多处理机、多核心处理器以及芯片级多处理(Chip-level multithreading)或同时多线程(Simultane
阅读全文
摘要:所谓的递归函数调用,就是自己调用自己的函数。 With this, functionHolder(3); would output 3 2 1 0. Let's say I did the following: Then functionHolder(3); would give Stop coun
阅读全文
摘要:参考: https://groups.google.com/forum/#!topic/golang-nuts/oawcWAhO4Ow Hi, Nan Xiao <xiaona...@gmail.com> writes: > (1) GOPATH="/root/go"; > (2) There is
阅读全文
摘要:有些问题,我以前都是似懂非懂,没有去弄个究竟!!!!! 这个习惯非常不好,搞得有些东西看似懂了,又不能百分之百说自己懂了,可能下次就弄不出来了,这样是不可取的。 不能有这种做事的风格。 就像写go的代码的时候, 要引用第三方库的时候, go get github.com/go-redis/redis
阅读全文
摘要:原文: https://golang.org/doc/code.html#PackagePaths 如果demo目录下有两个文件 main.go 和mian2.go的话,main.go 和main2.go文件中的package 定义的名字要是同一个 不同的话,是会报错的。 main2.go main
阅读全文
摘要:Nginx调用远程php-fpm 前后端分离的网站,要在异地部署多套网页的时候,这种nginx配置调用远程php-fpm的方式,不错。可以提高网页的相应速度。 原文: https://www.cnblogs.com/feiyafeiblog/p/6938515.html 在Nginx服务器的情况下,
阅读全文
摘要:How to get parent pid from a given children pid? I know I can mannully check it under /proc, I am wonder if there is a smart/better way to achieve thi
阅读全文
摘要:原文:http://davidcai.github.io/blog/posts/router-dynamic-templates/ ui-router : templateProvider vs template Router: Dynamic Templates Sat Aug 15, 2015
阅读全文
摘要:design patterns 结合书本和这个网站的这个系列的文章来看: https://www.tutorialspoint.com/design_pattern/builder_pattern.htm Builder pattern builds a complex object using s
阅读全文
摘要:原文: https://www.zhihu.com/question/26560512 441 个回答 默认排序 叶倩倩 公众号「小猫倩倩」,专注学习方法论 曾少贤 、 高太爷 等 3,544 人赞同了该回答 上周,喵写了一篇记录自己成长经历的文章,评论区很多小伙伴对喵工作之余每天4小时以上的阅读
阅读全文
摘要:什么叫持续集成? 原文: https://docs.microsoft.com/en-us/azure/devops/what-is-continuous-integration What is Continuous Integration? 04/04/2017 2 minutes to read
阅读全文
摘要:原文: https://www.sitepoint.com/10-essential-typescript-tips-tricks-angular/ In this article, we’ll dive into a set of tips and tricks that should come
阅读全文
摘要:研究fabricjs中发现,它提供canvas.on('mousemove', hh) 来绑定事件, 提供 canvas.off()来取消绑定事件这样的接口,很是方便, 那我们就不妨探究一下内在的实现原理: 通过 addEventListener() 可以对同一个事件绑定多个处理处理函数, 而通过
阅读全文
摘要:I've talked about the timing of directives in AngularJS a few times before. But, it's a rather complicated topic, so I don't mind digging a bit deeper
阅读全文
摘要:什么是刻意? 就是不能能只是模仿效仿别人,要有自己的创新。与别人不同 的地方
阅读全文
摘要:原文:https://phpenthusiast.com/blog/simplify-your-php-code-with-facade-class How to simplify a PHP code with the help of the façade pattern? Published N
阅读全文
摘要:15down votefavorite 3 15down votefavorite 3 3 I was reading through Oracle's introduction to OOP concepts and I came across this description: Real-wor
阅读全文
摘要:1. 有没有什么解析器(c或js)之类的能跑在单片机上, STM32的单片机。 都有啊,不过没用,没有实际意义。 micropython, elua, 你跑java都可以。 Espruino这个是javascript 版本的。
阅读全文
摘要:1. The behavior of objects in the real world is more complex than simply being in one state at a time. the conditions of an Object being in more than
阅读全文
摘要:听梁文道的《一千零一夜》,生命不能承受之轻,搜索到的一篇文章。 看到一个小孩天真的玩耍,第一次感动流泪是真感动,第二次看到后,觉得所有人都应该流泪,这就是一种媚俗。 下面的这种句式就是一种媚俗 ”总有一种力量,让我们泪流满面。“,为什么说这是一种媚俗呢? 因为希望所有人万众一心地接受,不要有疑问,
阅读全文