#!/usr/bin/ruby # -*- coding: utf-8 -*- require 'socket' include Socket::Constants require…
require 'rubygems' require 'net/ssh' Net::SSH.start('example.com', :username=>'userName…
class Filetest attr_accessor :filename def initialize(filename) @filename = filename end d…
#Counts the number of times a 'word' appears in a 'phrase' def CountWordOccurrence(word, p…
#!/usr/bin/ruby require "cgi" cgi = CGI.new("html3") cookie = cgi.cookies['yourCookie'] co…
#!/usr/bin/env ruby # -*- coding: utf-8 -*- # upircimage.rb /tmp/a.png # you may want chan…
require 'net/http' require 'net/https' url = URI.parse('https://example.com/') http = Net:…
<a></a>
#PennyBoki @ </dream.in.code> puts 'Enter the coefficients' puts 'Enter a: ' STDOUT.…
#!evn ruby require 'rubygems' require 'dl' require 'Win32API' #dll文件名 dllname = 'mm.dll' #…
require ‘open-uri’ require ‘iconv’ ic = Iconv.new(“UTF8”,”GB2312”) yang = open(“http://www…
def check_mount_nfs_1(ip,path) rtn = `/bin/ping -q -c 1 #{ip}` if $?.exitstatus == 0 rtn =…
Ruby 使用 Net::Ping 连接到指定的 TCP/UDP 端口