Skip to content

Instantly share code, notes, and snippets.

View bombless's full-sized avatar

York Xiang bombless

  • Guangzhou, China
View GitHub Profile
Citing Ron Maupin's answer from https://networkengineering.stackexchange.com/questions/33397/debugging-no-route-to-host-over-ethernet:
The ICMP message, "no route to host," means that ARP cannot find the layer-2 address for the destination host. Usually, this means that that the host with that IP address is not online or responding.
@bombless
bombless / steps.md
Created December 22, 2018 15:21
mac版fiddler安装教程
import Prelude hiding (product)
import Data.List (intercalate)
data Structure = Structure String [Structure] Int
instance Show Structure where
show (Structure name list id) =
"{\"name\":\"" ++ name ++ "\",\"id\":" ++ show id ++ ",\"list\":[" ++ intercalate "," (map show list) ++ "]}"
@bombless
bombless / gist:d06e420c216cd95d437b4b07cfcbd2e8
Created December 15, 2018 09:39
Use ctrl+d to forward delete on mac console
fyi
@bombless
bombless / 解决vagrant、virtualbox的private_network无效的问题.md
Last active November 16, 2018 07:39
解决vagrant/virtualbox的private_network无效的问题

从我windows7的机器打包了vagrant镜像到新的windows10的机器,结果vagrant的private_network设置没效了 对比了旧机器的设置之后,发现是eth1不见了,在旧机器上eth1的ip就是本地设的192.168.33.11,但是新机器上没有eth1,多了一个eth2,没有对应的ip

因为guest机装的是centos6,我在service network restart之后报了个错是弹出界面 eth1: 设备 eth1 似乎不存在, 初始化操作将被延迟。

于是我检查了/etc/udev/rules.d/70-persistent-net.rules,这台虚拟机镜像里前辈已经留下了一个/etc/udev/rules.d/70-persistent-net.rules.bak

rm /etc/udev/rules.d/70-persistent-net.rules(在此之前已经备份了) 然后reboot

@bombless
bombless / gist:9e96838f1646ae5b8b61f6c9a1d0d5d8
Created August 31, 2018 14:10
Rust compile with line number if you are using rustc directly
`rustc -C debuginfo=2 t/src/main.rs`
that is, using `-C debuginfo=2`
@bombless
bombless / README.md
Created August 30, 2018 09:51 — forked from joyrexus/README.md
collapsible markdown

collapsible markdown?

CLICK ME

yes, even hidden code blocks!

print("hello world!")
https://jonathansblog.co.uk/install-xdebug-in-centos7-with-php7
https://unix.stackexchange.com/a/50514
Basic vs Extended Regular Expressions
In basic regular expressions the meta-characters ?, +, {, |, (, and ) lose their special meaning; instead use the backslashed versions \?, \+, \{, \|, \(, and \).
Traditional egrep did not support the { meta-character, and some egrep implementations support \{ instead, so portable scripts should avoid { in grep -E patterns and should use [{] to match a
literal {.
GNU grep -E attempts to support traditional usage by assuming that { is not special if it would be the start of an invalid interval specification. For example, the command grep -E '{1' searches for
the two-character string {1 instead of reporting a syntax error in the regular expression. POSIX.2 allows this behavior as an extension, but portable scripts should avoid it.
http://paulbourke.net/dataformats/postscript/