Skip to content

Instantly share code, notes, and snippets.

@nicegraham
nicegraham / gist:8727932
Created January 31, 2014 07:33
authorize instruments
# give access to instruments & co.
sudo security authorizationdb write system.privilege.taskport /var/tmp/system.privilege.taskport.plist
sudo security authorizationdb write com.apple.dt.instruments.process.analysis /var/tmp/com.apple.dt.instruments.process.analysis.plist
sudo security authorizationdb write com.apple.dt.instruments.process.kill /var/tmp/com.apple.dt.instruments.process.kill.plist
WARNING: Ignored XML validation warning
org.xml.sax.SAXParseException; lineNumber: 5; columnNumber: 119; schema_reference.4: Failed to read schema document 'http://www.springframework.org/schema/beans/spring-beans.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:198)
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.warning(ErrorHandlerWrapper.java:99)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:433)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:347)
at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.reportSchemaErr(XSDHandler.java:4166)
at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.reportSchemaWarning(XSDHandler.java:4157)
at com.sun.org.apache.xerces.inter
Tracking Result
JOBNO: 85211379783
Origin Destination Connote DATE PCS
SCS HONG KONG UNITED KINGDOM 2014/4/17 1
DATE TIME LOCATION STATUS
2014/4/17 1841 SCS-HKG CHECK IN BY SCS SCS-HKG-BAR CODE COLLECTOR
2014/4/17 2052 SCS-HKG BAG IN BY STAFF CODE 90010-SCS-HKG
2014/4/19 1245 SCS-HKG EXPORT TO EUROPEAN HUB STATION
2014/4/21 0800 SCS-EU HUB CUSTOMS CLEARANCE DELAY
Sep 13 20:44:20 pptpd[1374]: CTRL: Client 192.168.1.14 control connection started
Sep 13 20:44:20 pptpd[1374]: CTRL: Starting call (launching pppd, opening GRE)
Sep 13 20:44:20 pptp[1375]: Plugin pptp.so loaded.
Sep 13 20:44:20 pptp[1375]: PPTP plugin version 0.8.5 compiled for pppd-2.4.5, linux-2.6.22.19
Sep 13 20:44:20 pptp[1375]: pppd 2.4.5 started by admin, uid 0
Sep 13 20:44:20 pptp[1375]: Using interface ppp10
Sep 13 20:44:20 pptp[1375]: Connect: ppp10 <--> pptp (192.168.1.14)
Sep 13 20:44:20 miniupnpd[493]: unsupported NAT-PMP version : 2
Sep 13 20:44:20 miniupnpd[493]: unsupported NAT-PMP version : 2
Sep 13 20:44:50 pptpd[1374]: CTRL: EOF or bad error reading ctrl packet length.
#!/bin/bash
# rx script
NIC="wlan0"
CHANNEL="6"
echo "updating wifi ($NIC, $CHANNEL)"
sudo ifconfig $NIC down; sudo iwconfig $NIC mode monitor
sleep 1
@nicegraham
nicegraham / TouchAction.java
Created August 16, 2012 12:26
Dynamically load jquery for TouchActions
package com.paddypower.selenium.framework;
import com.paddypower.reporter.ReporterFactory;
import org.openqa.selenium.JavascriptExecutor;
import org.openqa.selenium.WebDriver;
import java.io.IOException;
import java.io.InputStream;
public class TouchAction {
@nicegraham
nicegraham / DriverFactory.java
Created December 3, 2012 09:46
Running JBehave in parallel
import org.openqa.selenium.Capabilities;
import org.openqa.selenium.remote.RemoteWebDriver;
import java.net.URL;
import java.util.concurrent.TimeUnit;
public final class DriverFactory {
private RemoteWebDriver remoteWebDriver = null;
@nicegraham
nicegraham / DebugGrid.java
Last active December 15, 2015 18:19
debug grid
package org.uiautomation.ios.grid;
import org.openqa.grid.selenium.GridLauncher;
public class DebugGrid {
public static void main(String[] args) throws Exception {
String[] a = {"-port", "4444",
"-capabilityMatcher", "org.uiautomation.ios.grid.IOSCapabilityMatcher",
"-role", "hub"};
@nicegraham
nicegraham / gist:5304406
Created April 3, 2013 19:21
ios-driver faq
Troubleshooting configuration issues:
1) MobileSafari.app/Info.plist (Permission denied)
error starting instrument for session XXX, Cannot change the default device for the app.
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/
iPhoneSimulator6.0.sdk/Applications/MobileSafari.app/Info.plist (Permission denied)
Safari's Info.plist file contains the device family safari can be launched on.
It looks like : "UIDeviceFamily":[1,2]
1 is for iphone. 2 is for ipad.
IOSCapabilities cap = IOSCapabilities.iphone("InternationalMountains", "1.1");
cap.setCapability(IOSCapabilities.SIMULATOR, false);
cap.setCapability(IOSCapabilities.DEVICE, DeviceType.iphone);
RemoteIOSDriver driver = new RemoteIOSDriver(new URL("http://localhost:5555/wd/hub"), cap);
driver.logElementTree(new File("test.png"), false);