Skip to content

Instantly share code, notes, and snippets.

View yurenchen000's full-sized avatar
😶‍🌫️
may be slow to respond.

yurenchen000

😶‍🌫️
may be slow to respond.
View GitHub Profile
@yurenchen000
yurenchen000 / ping_with_timestamp.md
Created April 10, 2020 17:19
linux ping cmd with timestamp

https://askubuntu.com/a/400273/413480

1. time from ping -D

Another possibility to use the ping -D option which gets you the timestamp as Unix time.

tilo@t-ubuntu:~$ ping google.com -D
PING google.com (173.194.33.73) 56(84) bytes of data.
[1388886989.442413] 64 bytes from sea09s15-in-f9.1e100.net (173.194.33.73): icmp_req=1 ttl=57 time=11.1 ms
[1388886990.443845] 64 bytes from sea09s15-in-f9.1e100.net (173.194.33.73): icmp_req=2 ttl=57 time=11.0 ms
@yurenchen000
yurenchen000 / upnp_get_ext_ip.md
Last active April 17, 2020 16:28
IGD/UPNP client Get ExternalIPAddress

upnp get ext ip

IGD/UPNP get ExternalIPAddress of upper router

A. upnpc cmd

$ upnpc -s | grep ExternalIPAddress
ExternalIPAddress = 192.168.199.121
@yurenchen000
yurenchen000 / opkg_install_pkg_ver.md
Last active February 20, 2023 20:05
opkg install specify package version
@yurenchen000
yurenchen000 / config
Last active August 21, 2021 19:44
terminator_custom_ui_theme.md
### title bar color
# edit ~/.config/terminator/config
# or set in Preferences
[global_config]
inactive_color_offset = 0.939102564103
scroll_tabbar = True
title_inactive_bg_color = "#555753"
title_inactive_fg_color = "#888a85"
title_transmit_bg_color = "#75507b"
@yurenchen000
yurenchen000 / close_chan_emulate_broadcast.md
Last active September 3, 2022 19:37
golang_close_chan_emulate_broadcast

go chan broadcast

chan close to emulate broadcast

if only want signal (without pass value), wait channel close can do the trick:

@yurenchen000
yurenchen000 / github_md_toc_maximize.md
Created December 29, 2022 15:22
github readme.md toc maximize

Recently github has a very cramped TOC size,
Some pages are very difficult to read.

this script (paste and run in browser F12)
help maximize the TOC div size.

//github readme.md toc maximize
with(document.querySelector('readme-toc .SelectMenu-modal.mt-1').style){
 maxHeight=(document.documentElement.clientHeight-40)+'px'