View mac-command-line
# 列出磁盘
diskutil list
# umount挂载,这样可以把U盘分配给virtualbox
diskutil umountDisk /dev/disk2
卸载磁盘(弹出)
diskutil eject /dev/disk1s1
#关掉mac开机咚咚声音
永久关闭的话,输入以下命令即可:
View startAll.sh
#!/bin/bash
/home/dengpan/opt/nginx-1.9.9/sbin/nginx
/home/dengpan/github/hhvm/hhvm/hphp/hhvm/hhvm --mode daemon --user www --config /home/dengpan/myetc/hhvm/server.ini
View css-js-compress.sh
#!/bin/sh
#开启压缩css js的,压缩当前页面的所有css js
#cp /tmp/yuicompressor-2.4.8.jar 到/tmp
#然后这个脚本在你需要压缩css js的目录执行即可
a="/home/dengpan/www"
for i in `find $a -name "*.css"`
do
echo $i
java -jar yuicompressor-2.4.8.jar --type css --charset utf-8 -v $i -o $i
View Virtualbox
//uuid冲突
VBoxManage internalcommands sethduuid win-xp_2015_12_07.vdi
View mac-U盘挂载
//vim /etc/fstab
LABEL=dengpan_wd none ntfs rw,auto,nobrowse
View clion-file-template-muban-c
// create by dplord at ${YEAR}-${MONTH}-${DAY} ${HOUR}:${MINUTE}
#[[#include]]# <stdio.h>
#[[#include]]# <string.h>
int main(int argc, char** arrv)
{
return 0;
}
View clion-file-template-muban-c++
// create by dplord at ${YEAR}-${MONTH}-${DAY} ${HOUR}:${MINUTE}
#[[#include]]# <iostream>
#[[#include]]# <string>
#[[#include]]# <vector>
#[[#include]]# <fstream>
#[[#include]]# <sstream>
#[[#include]]# <boost/lexical_cast.hpp>
#[[#include]]# <map>
#[[#include]]# <unordered_map>
View TPhpStreamMy.php
<?php
/**
* Created by PhpStorm.
* User: dengpan
* Date: 16/4/21
* Time: 12:31
*/
View download_orcale_jdk.sh
curl -L -O -H "Cookie: oraclelicense=accept-securebackup-cookie" -k "http://download.oracle.com/otn-pub/java/jdk/8u73-b02/jdk-8u73-linux-x64.tar.gz"
View backup_whole.sh
#!/bin/bash
cd /home/dengpan/
nowTime=`date "+%Y%m%d_%H%m"`
tar Jcvf www_$nowTime.tar.xz www/
dir=dplord_com_whole_$nowTime
mkdir /home/dengpan/backup/$dir
mv www_$nowTime.tar.xz /home/dengpan/backup/$dir
cd /home/dengpan/backup/$dir