GithubHelp home page GithubHelp logo

gengxf / code_snippet Goto Github PK

View Code? Open in Web Editor NEW

This project forked from yeasy/code_snippet

0.0 2.0 0.0 170 KB

Some simple but useful source codes, scripts or templates, on networking, programming, algorithm, etc.

Python 28.50% C 57.43% Vim Script 4.16% Shell 9.91%

code_snippet's Introduction

#code_snippet

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 declarition 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.

##autopreview 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.

##algorithm Some code blocks for test algorithms, such as sorting, searching, etc..

##bf-gdt Example to show how to use the bloom-filter based gdt data structure.

##cpu Get overall cpu utilization at linux platform.

##ether_bridge Connect to network interface and forward ethernet packets between them bidirectionally, supporting options.

##getIP Some scripts to get local ip address of the network interfaces.

##getopt Show how to use getopt functions.

##io Test read and write functions.

##json Example to show how to use json encoding/decoding in python.

##mcast Test the multi-cast packet sending and receiving, using a thread separately.

##Makefile.template Simple template of Makefile.

##netlink Test bidirectional communication between userspace and kernelspace, using low-level netlink APIs in the userspace, and libnl APIs in the kernelspace.

##python Simple codes to show how to use python libraries, e.g., regrex, encoding. ###amqp Demo the usage of AMQP by the kombu and pika.

concurrency

Some scripts on concurrency programming, such as threading, eventlet... ###httpserver A simple webserver by python, which tracks request number of each visitor's IP address. ###mqtt Demo the usage of MQTT. ###prefixCutter Calculate the cut prefixes by given two prefixes. ###remote_watcher Watch the specified file on remote, trigger action when there finds keyword in it. ###sm_watcher Given some keyword and an url, will track it on the url webpage. User sm as an example. ###wsgi 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.

##remote ###remoteAuth.sh An ssh authorized script, which enables you to login into remote host automatically without passwd inputing. ###pull_agent.sh Daemon agent to pull some content from remote host, and do action after check changes. ###push_agent.sh Daemon agent to push some msg to remote host file.

##sendRawPkt Example to show how to construct a raw socket packet, with manually setting the mac, ip and udp header.

##service Example of a system service script in Debian/Ubuntu system, supporting running complicated command with arbitrary parameters.

##system Some system related tools, such as init a fresh os. ###getweb.sh Simple but powerful script, which can automatically download a website by URL and save it to local directory for offline reference. ###rm.sh A much safer rm script, which can automatically backup removed files, in case deleting useful data (beta version). ###nss 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.

code_snippet's People

Contributors

yeasy avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.