Skip to content

Instantly share code, notes, and snippets.

Socket

[Document on ruby-doc.org] [ruby_doc]

Introduction

Ruby provides a standard library Socket for networking programming in lower layer, such as TCP and UDP. There are also other libraries for application layers like HTTP, FTP and TELNET, they are not included in this tutorial.

What is Socket

Socket

[Document on ruby-doc.org] [ruby_doc]

Introduction

Ruby provides a standard library Socket for networking programming in lower layer, such as TCP and UDP. There are also other libraries for application layers like HTTP, FTP and TELNET, they are not included in this tutorial.

What is Socket

@ruanwz
ruanwz / README.mkd
Created December 30, 2010 15:04
Gist.vim
" Don't use abbreviations! Spelling things out makes grepping easy.
" Let Pathogen bring in all the plugins
filetype off
call pathogen#runtime_append_all_bundles()
set modelines=0
filetype indent plugin on
syntax on
" TODO: clean all this junk out!
eyJxdWlja1N3aXRjaFByb2ZpbGVzIjoie1wicHJvZmlsZTFcIjpcImRpcmVjdFwiLFwicHJvZmlsZTJcIjpcImRpcmVjdFwifSIsInJ1bGVzIjoie1wiUXVpY2sgUnVsZSAyOVwiOntcIm5hbWVcIjpcIjE5Mi4xNjguMS4qXCIsXCJ1cmxQYXR0ZXJuXCI6XCIqOi8vMTkyLjE2OC4xLipcIixcInBhdHRlcm5UeXBlXCI6XCJ3aWxkY2FyZFwiLFwicHJvZmlsZUlkXCI6XCJkaXJlY3RcIixcImlkXCI6XCJRdWljayBSdWxlIDI5XCJ9LFwiUXVpY2sgUnVsZSAzNVwiOntcIm5hbWVcIjpcImFtYXpvblwiLFwidXJsUGF0dGVyblwiOlwiKjovL3d3dy5hbWF6b24uY29tLypcIixcInBhdHRlcm5UeXBlXCI6XCJ3aWxkY2FyZFwiLFwicHJvZmlsZUlkXCI6XCJzc2hwXCIsXCJpZFwiOlwiUXVpY2sgUnVsZSAzNVwifSxcIlF1aWNrIFJ1bGUgMjZcIjp7XCJuYW1lXCI6XCJiYmMuY28udWtcIixcInVybFBhdHRlcm5cIjpcIio6Ly93d3cuYmJjLmNvLnVrLypcIixcInBhdHRlcm5UeXBlXCI6XCJ3aWxkY2FyZFwiLFwicHJvZmlsZUlkXCI6XCJzc2hwXCIsXCJpZFwiOlwiUXVpY2sgUnVsZSAyNlwifSxcIlF1aWNrIFJ1bGUgMjVcIjp7XCJuYW1lXCI6XCJiYmMuY28udWtcIixcInVybFBhdHRlcm5cIjpcIio6Ly93d3cuYmJjLmNvLnVrLypcIixcInBhdHRlcm5UeXBlXCI6XCJ3aWxkY2FyZFwiLFwicHJvZmlsZUlkXCI6XCJzc2hwXCIsXCJpZFwiOlwiUXVpY2sgUnVsZSAyNVwifSxcIlF1aWNrIFJ1bGUgOVwiOntcIm5hbWVcIjpcImJpdC5seVwiLFwidXJsUGF0dGVy
Started GET "/workloads/60/list_design" for 219.136.227.221 at Wed May 18 11:00:50 +0000 2011
Processing by WorkloadsController#list_design as HTML
Parameters: {"id"=>"60"}
Rendered workloads/_details.html.erb (9.4ms)
Rendered workloads/_toolbar.html.erb (19.3ms)
Rendered servers/_list_short_info.html.erb (12.1ms)
Rendered workloads/_list_tree.html.erb (25.6ms)
Rendered workloads/list.html.erb within layouts/application (45.3ms)
Completed in 90ms
; Summary: Proxy Switchy! Exported Rule List
; Date: Sunday, May 15, 2011
; Website: http://bit.ly/proxyswitchy
#BEGIN
[wildcard]
*://192.168.1.*
*://www.amazon.com/*
*://www.bbc.co.uk/*
#!/usr/bin/env bash
__bdsm_bash_completion()
{
local current_word previous flags commands extensions
# COMPREPLY=()
current_word="${COMP_WORDS[COMP_CWORD]}"
previous="${COMP_WORDS[COMP_CWORD-1]}"
extensions="$( bdsm list | tr "\n" ' ')"
#!/usr/bin/env bash
__bdsm_bash_completion()
{
local current_word previous flags commands extensions
COMPREPLY=()
current_word="${COMP_WORDS[COMP_CWORD]}"
previous="${COMP_WORDS[COMP_CWORD-1]}"
extensions="$( bdsm list | tr "\n" ' ')"