Skip to content

Instantly share code, notes, and snippets.

View suziewong's full-sized avatar
🍵
DeepWork

YangFei Zheng suziewong

🍵
DeepWork
View GitHub Profile
@suziewong
suziewong / apache.md
Last active March 2, 2018 07:52
Apache 知识经验整理

Apache

安全方面

1.勤打补丁[没经验,能先用好就不错了]

2.伪装版本

修改httpd.conf

ServerSignature off

@suziewong
suziewong / tcpdump.md
Last active August 13, 2019 08:31
Tcpdump

Tcpdump

看了蛮久的tcpdump,也一直很想尝试抓包这类的技能。

tcpdump

-i 指定监听网卡 lo eth0
-c 数量
-w xxx.cap(直接是wireshark的2进制文件)

-A ACSII显示内容

@suziewong
suziewong / network.md
Last active September 6, 2016 09:14
网络知识

私有地址(Private address)属于非注册地址,专门为组织机构内部使用。

私有网段是:

A类 10.0.0.0 --10.255.255.255
B类 172.16.0.0--172.31.255.255
C类 192.168.0.0--192.168.255.255

还有一个特殊的IP地址,就是127网段的,这是测试地址,即不属于公网,也不属于私网.

@suziewong
suziewong / ssh.md
Last active April 27, 2018 02:14
SSH端口转发实验

通过本机的81号端口访问测试服务器89的我的私人apache目录(端口为11063)

使用本地转发,在本机上输入

ssh -L 81:210.32.200.89:11063 suzie@210.32.200.89

这时候打开浏览器,输入地址127.0.0.1:81 我同时也试验了

ssh -L 81:127.0.0.1:11063 suzie@210.32.200.89

ssh -L 81:localhost:11063 suzie@210.32.200.89

@suziewong
suziewong / cookie_session.md
Created December 25, 2012 04:49
PHP中session与cookie的区别?
@suziewong
suziewong / self _parent.md
Created December 25, 2012 04:41
PHP中 self 和 parent 的区别?

a)在子类中常用到这两个对像。他们的主要区别在于self可以调用父类中的公有或受保护的属性,但parent不可以调用

b).self:: 它表示当前类的静态成员(方法和属性) 与 $this 不同,$this是指当前对像 附代码:

@rednaxelafx
rednaxelafx / DirectMemorySize.java
Created January 11, 2012 07:18
An Serviceability-Agent based tool to see stats of NIO direct memory, as an alternative on JDK6 without JMX support for direct memory monitoring. Only works on JDK6; to work on JDK7 will need some tweaking because static variables are moved to Java mirror
import java.io.*;
import java.util.*;
import sun.jvm.hotspot.memory.*;
import sun.jvm.hotspot.oops.*;
import sun.jvm.hotspot.debugger.*;
import sun.jvm.hotspot.runtime.*;
import sun.jvm.hotspot.tools.*;
import sun.jvm.hotspot.utilities.*;
public class DirectMemorySize extends Tool {
@yegle
yegle / bash-invocation.md
Created January 5, 2012 11:44
Bash Shell启动方式与RC脚本

Bash Shell启动方式与rc脚本

Shell的不同分类

根据启动Bash Shell的方式不同,对Shell有两种分类方式

登录Shell与非登录Shell

根据Shell的启动方式不同,可以将Shell分为

@chitchcock
chitchcock / 20111011_SteveYeggeGooglePlatformRant.md
Created October 12, 2011 15:53
Stevey's Google Platforms Rant

Stevey's Google Platforms Rant

I was at Amazon for about six and a half years, and now I've been at Google for that long. One thing that struck me immediately about the two companies -- an impression that has been reinforced almost daily -- is that Amazon does everything wrong, and Google does everything right. Sure, it's a sweeping generalization, but a surprisingly accurate one. It's pretty crazy. There are probably a hundred or even two hundred different ways you can compare the two companies, and Google is superior in all but three of them, if I recall correctly. I actually did a spreadsheet at one point but Legal wouldn't let me show it to anyone, even though recruiting loved it.

I mean, just to give you a very brief taste: Amazon's recruiting process is fundamentally flawed by having teams hire for themselves, so their hiring bar is incredibly inconsistent across teams, despite various efforts they've made to level it out. And their operations are a mess; they don't real

@pithyless
pithyless / gist:1208841
Created September 10, 2011 21:49
Install Python 2.7 (homebrew + pip + virtualenv) on Mac OS X Lion

Install Python

$ brew install readline sqlite gdbm
$ brew install python --universal --framework
$ python --version
Python 2.7

Symlinks...