05 2016 档案

摘要:最近需要写一个脚本备份各个服务器上的程序到一个指定服务器上,本来以为查查rsync命令的使用321就能搞定,结果rsync命令要支持自动登 录还是要配置服务和参数,又不确定网上说的配置的行不行,因为都是一个样,但是没有说明头尾,所以选择了一个尝试代价较小的ssh自动登录来替代之。 ssh大家都能用到 阅读全文
posted @ 2016-05-31 21:37 godjob 阅读(708) 评论(0) 推荐(0)
摘要:在linux下一般用scp这个命令来通过ssh传输文件。 1、从服务器上下载文件scp username@servername:/path/filename /var/www/local_dir(本地目录) 例如scp root@192.168.0.101:/var/www/test.txt 把19 阅读全文
posted @ 2016-05-31 21:34 godjob 阅读(195) 评论(0) 推荐(0)
摘要:# ctrl + l - 清屏 # ctrl + c - 终止命令 # ctrl + d - 退出 shell,好像也可以表示EOF # ctrl + z - 将当前进程置于后台,fg还原。 # ctrl + r - 从命令历史中找 # ctrl + a - 光标移到行首 # ctrl + e - 阅读全文
posted @ 2016-05-31 21:22 godjob 阅读(220) 评论(0) 推荐(0)
摘要:最近在自己的ubuntu安装了apache服务器,每次开机的时候通过: ps -A 命令发现apache服务总是自动启动,如下: 本来自己的电脑内存就小,现在也不用这个服务,所以想让apache服务不再开机自动启动。 具体做法如下: ctr + alt + T 打开终端 cd /etc 进入etc目 阅读全文
posted @ 2016-05-31 20:49 godjob 阅读(2100) 评论(0) 推荐(0)
摘要:来源《鸟哥的linux私房菜》 ps:将某个时间点的程序运作情况撷取下来 [root@linux ~]# ps aux [root@linux ~]# ps -lA [root@linux ~]# ps axjf 参数: -A :所有的 process 均显示出来,与 -e 具有同样的效用; -a 阅读全文
posted @ 2016-05-31 20:40 godjob 阅读(466) 评论(0) 推荐(0)
摘要:一、安装 因为我已经安装了pip,那么就直接用pip来安装了,简单方便。 其它的安装方式请参考官方网站:http://www.virtualenv.org/en/latest/index.html 二、创建虚拟环境 很简单,就是virtualenv 环境名称[自定义的名称,自己喜欢什么就写什么] 默 阅读全文
posted @ 2016-05-31 19:49 godjob 阅读(187) 评论(0) 推荐(0)
摘要:参考:http://bbs.chinapyg.com/thread-79022-1-1.html 各平台版本均适用,本文更改的为Mac版本。​ 1,打开对应 mac版本的安装包位置,在对应目录/Applications/StarUML.app/Contents/www/license/node/Li 阅读全文
posted @ 2016-05-25 22:12 godjob 阅读(306) 评论(0) 推荐(0)
摘要:从http://www.sourceinsight.com/public/languages/下载Python的配置文件Python.CLF 选择Options > Preferences,单击Languages选项; 单击import按钮,装载并导入Python.CLF; 这时可以看到,左栏语言列 阅读全文
posted @ 2016-05-25 21:47 godjob 阅读(5747) 评论(0) 推荐(0)
摘要:Given a positive integer n, break it into the sum of at least two positive integers and maximize the product of those integers. Return the maximum pro 阅读全文
posted @ 2016-05-20 23:45 godjob 阅读(163) 评论(0) 推荐(0)
摘要:Rotate an array of n elements to the right by k steps. For example, with n = 7 and k = 3, the array [1,2,3,4,5,6,7] is rotated to [5,6,7,1,2,3,4]. Not 阅读全文
posted @ 2016-05-17 23:09 godjob 阅读(262) 评论(0) 推荐(0)
摘要:Write a function that takes a string as input and reverse only the vowels of a string. Example 1: Given s = "hello", return "holle". Example 2: Given 阅读全文
posted @ 2016-05-16 21:50 godjob 阅读(264) 评论(0) 推荐(0)
摘要:Given a non negative integer number num. For every numbers i in the range 0 ≤ i ≤ num calculate the number of 1’s in their binary representation and r 阅读全文
posted @ 2016-05-14 14:39 godjob 阅读(223) 评论(0) 推荐(0)
摘要:题目描述: Given a non-empty array of integers, return the k most frequent elements. For example, Given [1,1,1,2,2,3] and k = 2, return [1,2]. Note: You ma 阅读全文
posted @ 2016-05-13 22:42 godjob 阅读(216) 评论(0) 推荐(0)
摘要:Linux中find常见用法示例 ·find path -option [ -print ] [ -exec -ok command ] {} \; find命令的参数; pathname: find命令所查找的目录路径。例如用.来表示当前目录,用/来表示系统根目录。-print: find命令将匹 阅读全文
posted @ 2016-05-05 10:33 godjob 阅读(306) 评论(0) 推荐(0)