Some simple but useful source codes, scripts or templates, on networking, programming, algorithm, etc.
Most of them are written by me, while some one may be collected from Internet or modified based or public-available codes.
All files are free to use, distribute or modify, with keeping the declare part on the file head. However, the authors WILL NOT be responsible for any result by these files. If you think there might be some one affecting your privilege, please let me know.
A light script plugin for Vim that could automatically preview the definition of variables or functions in a tiny window like source insight. Also be hosted at the vim homepage.
Some code blocks for test algorithms, such as sorting, searching, etc..
Example to show how to use the bloom-filter based gdt data structure.
Get overall cpu utilization at linux platform.
Some docker related scripts and tools.
Do some cleanup work on Docker Host, e.g., removing stopped containers and untagged images.
Test two containers connecting through OpenvSwitch with iperf
Save all local Docker images into tar.gz files.
This script will load into the tar.gz files as images.
Connect to network interface and forward ethernet packets between them bidirectionally, supporting options.
Some scripts to get local ip address of the network interfaces.
Show how to use getopt functions.
Test read and write functions.
Example to show how to use json encoding/decoding in python.
Test the multi-cast packet sending and receiving, using a thread separately.
Simple template of Makefile.
Test bidirectional communication between userspace and kernelspace, using low-level netlink APIs in the userspace, and libnl APIs in the kernelspace.
Use openssl to generate certificate and serve a website with TLS.
Simple codes to show how to use python libraries, e.g., regrex, encoding.
Demo the usage of AMQP by the kombu and pika.
Some scripts on concurrency programming, such as threading, eventlet...
Generate an initialized gitbook project based on the given source code path.
A simple webserver by python, which tracks request number of each visitor's IP address.
Demo the usage of MQTT.
Calculate the cut prefixes by given two prefixes.
Watch the specified file on remote, trigger action when there finds keyword in it.
Track (and filter) the board articles on the given url (newsmth now), and show them in a webpage in realtime (using jquery and HTML5 websocket).
Auto fetch proxy information and update local config.
A demo to show how to use wsgi and paste deployment to provide a web service.
Run python server.py
and get the version information by visiting localhost:8080.
An ssh authorized script, which enables you to login into remote host automatically without passwd inputing.
Daemon agent to pull some content from remote host, and do action after check changes.
Daemon agent to push some msg to remote host file.
Example to show how to construct a raw socket packet, with manually setting the mac, ip and udp header.
Useful shell scripts.
Some system related tools, such as init a fresh os.
Simple but powerful script, which can automatically download a website by URL and save it to local directory for offline reference.
A much safer rm script, which can automatically backup removed files, in case deleting useful data (beta version).
This script will show all ip address inside each network namespace. If give a parameter, then it will show the network namespace containing the key. This is useful for openstack debugging.
Example of a system service script in Debian/Ubuntu system, supporting running complicated command with arbitrary parameters.
Optimized configuration for /etc/sysctl.conf.
Optimized configuration for /etc/security/limits.conf.