Skip to content

Instantly share code, notes, and snippets.

View wzhsunn's full-sized avatar
💭
github

sunny wzhsunn

💭
github
View GitHub Profile
//https://blog.csdn.net/u011394071/article/details/53198672
@wzhsunn
wzhsunn / gist:e1d73775e73d0672c4a22535eaa3dff0
Created November 16, 2018 15:35
虚拟机磁盘压缩.md
sudo dd if=/dev/zero of=/EMPTY bs=1M
sudo rm -f /EMPTY
vboxmanage modifyhd newdisk.vdi --compact
新建虚拟机,测试是否可用,删掉旧的虚拟机。
@wzhsunn
wzhsunn / PhpStorm Keymap
Created April 4, 2017 03:07 — forked from niweea/PhpStorm Keymap
PhpStorm快捷键
### Editing ###
`Ctrl + Space` 基本代码完成(任意类的,方法的或者变量的名称)
`Ctrl + Shift + Enter` 补全当前语句
`Ctrl + P` Parameter info (within method call arguments)
`Ctrl + Q` 快速查找文档
`Ctrl + 鼠标滑过` 简明信息查看
`Ctrl + F1` 在插入符号处显示错误或者警告信息
`Alt + Insert` 生成代码...(Getters,Setters,Constructors)
`Ctrl + O` 重写方法
`Ctrl + I` 实现方法
CString cpu_id()
{
int s1, s2;
CString CPUID_1;
__asm{
mov eax, 01h
xor edx, edx
cpuid
mov s1, edx
@wzhsunn
wzhsunn / redmine-3.0.2-on-ubuntu-14.04
Created June 20, 2016 02:28 — forked from wenzhixin/redmine-3.0.2-on-ubuntu-14.04
redmine 3.0.2 installer on ubuntu 14.04(new installtion) with nginx, mysql and puma
# set cache proxy
sudo vi /etc/apt/apt.conf << EOT
Acquire::http::Proxy "http://192.168.88.10:3142";
Acquire::HTTP::Proxy::192.168.88.10 "DIRECT";
EOT
sudo apt-get update
sudo apt-get upgrade
@wzhsunn
wzhsunn / FBReader.md
Last active March 15, 2016 06:26
FBReader 编译
@wzhsunn
wzhsunn / work_thread.cpp
Created December 22, 2015 08:53
mfc work thrad
// StdAfx.h
#define WM_UPDATE_CONTROL WM_APP + 0x10
// MyDialog.h
class CMyDialog : public CDialog
{
public:
CMyDialog(CWnd* pParent = NULL);
private:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto em1
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
# User-specific files
*.suo
*.user
*.userosscache
*.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio)

root@ubuntu-librenms:/opt/librenms/rrd/192.168.26.86# rrdtool fetch port-11.rrd AVERAGE -r 5m -s -10m
                       INOCTETS           OUTOCTETS            INERRORS           OUTERRORS         INUCASTPKTS        OUTUCASTPKTS        INNUCASTPKTS       OUTNUCASTPKTS          INDISCARDS         OUTDISCARDS     INUNKNOWNPROTOS     INBROADCASTPKTS    OUTBROADCASTPKTS     INMULTICASTPKTS    OUTMULTICASTPKTS

1431521100: 3.1494997233e+03 1.3662389476e+03 0.0000000000e+00 0.0000000000e+00 6.7418706488e+00 7.3583300658e+00 2.2080580639e-01 1.8312894528e-01 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 1.8161435166e-01 8.7473877613e-02 3.9191454724e-02 9.5655067668e-02
1431521400: 2.6977047230e+03 1.2687213582e+03 0.0000000000e+00 0.0000000000e+00 6.3283237552e+00 7.0040621689e+00 2.3171095359e-01 1.5191616249e-01 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 1.9757028204e-01 6.6160386555e-02 3.4140671545e-02 8.5755775932e-02
1431521700: -nan -nan -nan -nan -nan -nan -nan -nan -nan -nan -nan -na