This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.openqa.selenium.JavascriptExecutor; | |
import org.openqa.selenium.WebDriver; | |
public class LocalStorage { | |
private JavascriptExecutor js; | |
public LocalStorage(WebDriver webDriver) { | |
this.js = (JavascriptExecutor) webDriver; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local ffi = require 'ffi' | |
local C = ffi.C | |
local ffi_cast = ffi.cast | |
local ffi_str = ffi.string | |
local M = {} | |
ffi.cdef [[ | |
size_t strlen(const char *str); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Convert an IP in text format to its binary format. | |
* | |
* @param textIP literal IP | |
* @return byte array or null if failed. | |
*/ | |
private byte[] getAddress(String textIP) { | |
if (IPAddressUtil.isIPv4LiteralAddress(textIP)) { | |
return IPAddressUtil.textToNumericFormatV4(textIP); | |
} else if (IPAddressUtil.isIPv6LiteralAddress(textIP)) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo ngrep -d eth0 -q -W byline port 8080 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
awk 'BEGIN{t=0}{t += $1}END{print "Sum: " t, "Lines:" NR,"Avg:" t/(NR)}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
java -XX:+UnlockDiagnosticVMOptions -XX:+PrintFlagsFinal -version |