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
var page = new WebPage(), | |
address, output, size; | |
address = "http://www.metachunk.com/"; | |
width = 1024; height = 600; | |
output = "./screenshots/wat-"+width+"X"+height+".png"; | |
page.viewportSize = { width: width, height: height }; | |
if (phantom.args.length === 3 && phantom.args[1].substr(-4) === ".pdf") { |
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
02-16 12:25:47.945: W/System.err(1008): at android.app.ActivityThread.main(ActivityThread.java:4424) | |
02-16 12:25:47.945: W/System.err(1008): at java.lang.reflect.Method.invokeNative(Native Method) | |
02-16 12:25:47.965: W/System.err(1008): at java.lang.reflect.Method.invoke(Method.java:511) | |
02-16 12:25:47.965: W/System.err(1008): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784) | |
02-16 12:25:47.965: W/System.err(1008): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551) | |
02-16 12:25:47.965: W/System.err(1008): at dalvik.system.NativeStart.main(Native Method) | |
02-16 12:25:47.965: D/skia(1008): ---- read threw an exception | |
02-16 12:25:47.985: W/System.err(1008): android.os.NetworkOnMainThreadException | |
02-16 12:25:47.985: W/System.err(1008): at android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1099) | |
02-16 12:25:47.995: W/System.err(1008): at libcore.io.BlockGuardOs.recvfrom(BlockGuardOs.java:163) |
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
<?php | |
namespace CHH; | |
trait MetaObject | |
{ | |
protected static $metaClass; | |
static function setMetaClass(MetaClass $metaClass) | |
{ |
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
from selenium.common.exceptions import NoSuchElementException, TimeoutException | |
class DomHelper(object): | |
driver = None | |
waiter = None | |
def open_page(self, url): | |
self.driver.get(url) |
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
# coding: utf-8 | |
require 'sinatra' | |
set server: 'thin', connections: [] | |
get '/' do | |
halt erb(:login) unless params[:user] | |
erb :chat, locals: { user: params[:user].gsub(/\W/, '') } | |
end | |
get '/stream', provides: 'text/event-stream' do |
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
# | |
# Get development tools installed | |
# | |
sudo yum install -y git cvs zlib-devel | |
sudo yum groupinstall -y "Development Tools" | |
# | |
# Install RVM | |
# | |
bash < <(curl -s https://rvm.beginrescueend.com/install/rvm) |
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
require 'net/http' | |
download_file_name = "selenium-server-standalone-2.14.0.jar" | |
begin | |
open(download_file_name, "wb") do |destination| | |
Net::HTTP.start("selenium.googlecode.com") do |http| | |
resp = http.request_get("/files/#{download_file_name}") do |response| | |
total = response.content_length | |
progress = 0 |
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
var webdriverjs = require("webdriverjs"); | |
var client = webdriverjs.remote({ | |
host:"localhost", | |
port: 4444, | |
desiredCapabilities:{browserName:"firefox"} | |
}); | |
client | |
.testMode() | |
.init() |
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
#encoding: utf-8 | |
require 'selenium-webdriver' | |
include Selenium | |
capabilities = WebDriver::Remote::Capabilities.chrome(:native_events => true) | |
capabilities['chrome.switches'] = ["--ignore-certificate-errors"] | |
driver = WebDriver.for(:remote, | |
:desired_capabilities => capabilities, | |
:url => "http://192.168.1.44:4444/wd/hub" | |
) | |
driver.navigate.to "https://trunk.plus1.oemtest.ru/" |
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
#encoding: utf-8 | |
require 'selenium-webdriver' | |
server = "htts://192.168.2.170:4444/wd/hub" | |
ad_url = "http://test.trunk.plus1.oemtest.ru/2.0.php?id=4415" | |
profile = Selenium::WebDriver::Firefox::Profile.new |