Skip to content

Instantly share code, notes, and snippets.

@githubutilities
githubutilities / PollingSocketServer.py
Last active August 17, 2021 05:47
Socket Programming in Python
__author__ = 'will'
__version__ = "0.1"
__all__ = ["start_socket_server"]
import select
import socket
def start_socket_server():
CONNECTION_LIST = []
BUFFER_SIZE = 1024
@githubutilities
githubutilities / README.md
Last active September 27, 2022 07:44
Some Internet IP things

IP conflict symptom

  • No internet access, because the gateway detects that your mac address and ip address does not match what is stored
  • ping 127.0.0.1--OK
  • ping network-ip--For windows 7, this appear to be OK while for Mac OSX, ping: sendto: No route to host error log pops out
  • ping network-gateway--ping: sendto: No route to host
  • arp -a—-For windows 7, it may output history version of the arp table while for Mac OSX, it outputs nothing

arp table observation

@githubutilities
githubutilities / README.md
Created April 25, 2015 03:06
Shell hacks
@githubutilities
githubutilities / README.md
Last active March 18, 2026 12:21
Shadowsocks proxy and ssh proxy

Shadowsocks Proxy

apt-get install python-pip
pip install shadowsocks

sudo ssserver -p 443 -k password -m aes-256-cfb --user nobody -d start
@githubutilities
githubutilities / README.md
Last active August 29, 2015 14:19
Search Box in Jekyll
@githubutilities
githubutilities / README.md
Created April 20, 2015 14:30
Counting source code line number
@githubutilities
githubutilities / README.md
Last active August 29, 2015 14:19
Mac OSX Hacks
@githubutilities
githubutilities / README.md
Last active August 29, 2015 14:19
C Tricks
@githubutilities
githubutilities / README.md
Last active August 29, 2015 14:18
Ruby CheatSheet

Ruby Tools

# lookup for `INSTALLATION DIRECTORY` and `GEM PATHS` env variables
gem env

# install from local gem repository
gem install --local path_to_gem/filename.gem

# Interactive ruby shell