
使用linux打包目录时排除某些文件或目录
一般打包命令:
tar -zcvf /mnt/wwwroot.tar.gz /mnt/wwwroot
排除某目录或文件:
tar -zcvf /mnt/wwwroot.tar.gz --exclude=*.svn /mnt/wwwroot
此处加入 --exclude 参数排除,多个参数就写多个,
另外:如果需要排除的是目录,不能以/结尾.
一般打包命令:
tar -zcvf /mnt/wwwroot.tar.gz /mnt/wwwroot
排除某目录或文件:
tar -zcvf /mnt/wwwroot.tar.gz --exclude=*.svn /mnt/wwwroot
此处加入 --exclude 参数排除,多个参数就写多个,
另外:如果需要排除的是目录,不能以/结尾.
CentOS 7.x相对于6.x的改变
首先是目录结构方面的改变:
/bin转移到/usr/bin;/
sbin转移到/usr/sbin;
/lib转移到/usr/lib;
/lib64转移到/usr/lib64.
/var/run符号连接到/run;
/var/lock符号连接到/run/lock.
临时文件夹/tmp是内存虚拟出来的空间(tmpfs类型),systemctl enable/disable tmp.mount启用或停用。
特权进程,如后台服务等,临时文件存放在/run/processname;
进程临时文件较大,需要在服务器重启后可取回的放在/var/tmp,其他情况就放在/tmp下。
本地化配置由/etc/sysconfig/i18n转移到/etc/locale.conf和/etc/vconsole.conf。
hostname配置有/etc/sysconfig/network转移到/etc/hostname。
关于磁盘分区:
就在刚刚,我编译nginx的时候,突然得到了一条坑爹的提示:
./configure: error: invalid option "--with-http_spdy_module"
不应该啊,应该有spdy模块啊,无意中想到会不会是新版本的问题。我升级的是1.9.5..
于是找到官方文章看了一下,看到下面这段:
The ngx_http_v2_module module (1.9.5) provides support for HTTP/2 and supersedes thengx_http_spdy_module module. This module is not built by default, it should be enabled with the --with-http_v2_moduleconfiguration parameter.
把--with-http_spdy_module换成--with-http_v2_module之后重新编译通过...
附上NGINX官方说明:http://nginx.org/en/docs/http/ngx_http_v2_module.html
#!/bin/sh # POST-COMMIT HOOK # # The post-commit hook is invoked after a commit. Subversion runs # this hook by invoking a program (script, executable, binary, etc.) # named 'post-commit' (for which this file is a template) with the # following ordered arguments: # # [1] REPOS-PATH (the path to this repository) # [2] REV (the number of the revision just committed) # # The default working directory for the invocation is undefined
全站变灰CSS
body,.gray{ -webkit-filter: grayscale(100%); -moz-filter: grayscale(100%); -ms-filter: grayscale(100%); -o-filter: grayscale(100%); filter: grayscale(100%); filter: gray; }
图片变灰CSS
img { opacity: 0.8; -webkit-transition: all 0.3s ease-out; -webkit-filter: grayscale(100%); -moz-filter: grayscale(100%); -ms-filter: grayscale(100%); -o-filter: grayscale(100%); filter: grayscale(100%); }
骂出哲理:
1. 贱人永远都是贱人,就算经济危机了,你也贵不了!
2. 玩感情?我会让你哭的很有节奏!
3. 如果你看到面前的阴影,别怕,那是因为你的背后有阳光。
4. 遇事要先从自己身上找原因,别一拉不出屎就怪地球没有吸引力?你喷粪之前先想想你自己都干过什么,有没有资格说别人!我是不够完美,但是我坦白自然,你呢?
5. 别和我装你活的精彩,过的幸福,也别祝我幸福,你有那资格吗?
6. 和人接触的时间越长,我就越喜欢狗,狗永远是狗,人有时候不是人!
7. 别在分手的时候和我说:“其实你很好” 草,那你还甩我?
8. 唾沫是用来数钞票的,而不是用来讲道理的!
9. 不该看的不看,不该说的不说,不该听的不听,不该想的不想,该干什么干什么去!
10. 少在我面前拽的跟二五八万似的,摆好POSE在装逼!
11. 我等待你的关心,等的关上了心!
12. 不要吹牛B、请把牛B还给牛、因为牛也需要生活!
13. 喜欢你的时候你说什么就是什么,不喜欢你的时候,你说你是什么?
14. 我们只有一个地球,所以你要爱护地球;地...
此方法是在登录之后操作的,不需要停止服务,执行完毕后重新连接即可!
use mysql; update user set password=password('new password') where user='root'; flush privileges;
----- BEGIN LICENSE -----
Andrew Weber
Single User License
EA7E-855605
813A03DD 5E4AD9E6 6C0EEB94 BC99798F
942194A6 02396E98 E62C9979 4BB979FE
91424C9D A45400BF F6747D88 2FB88078
90F5CC94 1CDC92DC 8457107A F151657B
1D22E383 A997F016 42397640 33F41CFC
E1D0AE85 A0BBD039 0E9C8D55 E1B89D5D
5CDB7036 E56DE1C0 EFCC0840 650CD3A6
B98FC99C 8FAC73EE D2B95564 DF450523
------ END LICENSE ------
—– BEGIN LICENSE —–
K-20
Single User License
EA7E-940129
3A099EC1 C0B5C7C5 33EBF0CF BE82FE3B
EAC2164A 4F8EC954 4E87F1E5 7E4E85D6
C5605DE6 DAB003B4 D60CA4D0 77CB1533
3C47F579 FB3E8476 EB3AA9A7 68C43CD9
8C60B563 80FE367D 8CAD14B3 54FB7A9F
4123FFC4 D63312BA 141AF702 F6BBA254
B094B9C0 FAA4B04C 06CC9AFC FD412671
82E3AEE0 0F0FAA
1、备份CentOS-Base.repo
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
2、下载新的CentOS-Base.repo 到/etc/yum.repos.d/
CentOS 5
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repo
CentOS 6
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
CentOS 7
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
3、完成之后清空yum缓存,并重建yum缓存
yum clean all && yum clean&n
请支持正版软件:以下提供下载链接
Win版本下载链接:http://xiazai.beyondcompare.cc/wm/Beyond_Compare-Trial-WM.exe
Mac下载链接:http://xiazai.beyondcompare.cc/wm/Beyond_Compare-Mac-Trial.zip
1、快捷键安装:按 Ctrl +` 快捷键粘贴相应版本
2、菜单安装:View > Show Console [视图 > 控制台]粘贴相应代码
Sublime Text 2
import urllib2,os,hashlib; h = 'eb2297e1a458f27d836c04bb0cbaf282' + 'd0e7a3098092775ccb37ca9d6b2e4b7d'; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); os.makedirs( ipp ) if not os.path.exists(ipp) else None; urllib2.install_opener( urllib2.build_opener( urllib2.ProxyHandler()) ); by = urllib2.urlopen( 'http://packagecontrol.io/' + pf.replace(' ', '%20')).read(); dh = hashlib.sha256(by).hexdigest(); open( os.path.join( ipp, pf), 'wb' ).write(by) if dh == h else None; print('Error validating download (got %s instead of %s), please try manual install' % (dh, h) if dh != h else 'Please restart Sublime Text to finish installati
Windows Explorer Shell 支持 Overlay Icon 最多15个,Windows OneDrive自身已经使用了5个,所以就只剩下了10个 供我们使用。
如果你之前安装了例如360UDiskGuard,SkyDrivePro这样的软件,那么可能我们可利用的就更少了,轮不到Tortoise了。像这样的情况,我们可以调整 Tortoise图标名称的字母顺序,来提高Tortoise的优先位置,因为Windows 内部就是安装名称的字母顺序来优先显示的。
解决的步骤:在运行里输入regedit进入注册表界面,
HKEY_LOCAL_MACHINE>SOFTWARE>Microsoft>Windows>CurrentVersion>Explorer>ShellIconOverlayIdentifiers
打开后发现Tortoise 系列前面有好多项,Tortoise 系列排到了15名之后,难怪不显示。现在的任务就是把它们提到前面了,名字前面的空格越多排名越靠前,然后关闭注册表,重启Explorer。
Win10一月技术预览版内置了一批新功能,也有一些正在改变的功能和界面,只是微软没有准备好展示给测试者。在Build 9926版本中,Win10的任务栏时间日期面板也有改进,可以通过注册表开启
1.键盘快捷键WIN+R打开运行,输入regedit打开注册表编辑器
2.前往HKEY_LOCAL_MACHINE>Software>Microsoft>Windows>CurrentVersion>ImmersiveShell
3.创建新的DWORD(32-bit),名字为UseWin32TrayClockExperience,保持0值 屏幕截图(34).png
4.点击任务栏右下角的时间和日期会打开新的面板,界面上的“其他时钟”可以打开闹钟应用里的“世界时钟”,但添加城市目前还不会在任务栏的时间日期面板里显示。
/** * 遍历路径下文件存为数组 * @param String $path 要遍历文件的路径 * @return Array 返回存入全局作用域中的数组 */ function traverse($path='.'){ static $files_list = array(); foreach ($files = array_diff(scandir($path),array('.','..')) as $file) { $filename = $path.'/'.$file; if (is_dir($filename)) { traverse($filename); }else{ $files_list[] = $f