YARD CHEATSHEET http://yardoc.org
cribbed from http://pastebin.com/xgzeAmBn
Templates to remind you of the options and formatting for the different types of objects you might want to document using YARD.
| info: --> POST /wd/hub/session {"desiredCapabilities":{"platformName":"ios","app":"/Users/tcollins/Documents/Git/bi-iPhone/iPhoneBI/build/Debug-iphonesimulator/iPhoneBI.app","#app":"/Users/tcollins/Documents/TestTools/appium/sample-code/apps/UICatalog/build/Release-iphonesimulator/UICatalog.app","deviceName":"iPhone Simulator"}} | |
| debug: Appium request initiated at /wd/hub/session | |
| info: <-- POST /wd/hub/session 303 1.583 ms - 9 | |
| debug: Request received with params: {"desiredCapabilities":{"platformName":"ios","app":"/Users/tcollins/Documents/Git/bi-iPhone/iPhoneBI/build/Debug-iphonesimulator/iPhoneBI.app","#app":"/Users/tcollins/Documents/TestTools/appium/sample-code/apps/UICatalog/build/Release-iphonesimulator/UICatalog.app","deviceName":"iPhone Simulator"}} | |
| debug: Appium request initiated at /wd/hub/session/4e23b43c-111b-40e0-a10b-08cfa03126ce | |
| debug: Request received with params: {} | |
| debug: Responding to client with success: {"status":0,"value":{"webStorageEnabled":false,"locationContextEnabled":false,"brow |
| import collections, json | |
| from urllib import urlretrieve | |
| from urlparse import urljoin | |
| from csv import DictReader, reader as csv_reader | |
| import scrapinghub | |
| from project.settings import SH_APIKEY | |
cribbed from http://pastebin.com/xgzeAmBn
Templates to remind you of the options and formatting for the different types of objects you might want to document using YARD.
| import org.w3c.dom.Document; | |
| import org.w3c.dom.Node; | |
| import org.w3c.dom.NodeList; | |
| import org.xml.sax.InputSource; | |
| import org.xml.sax.SAXException; | |
| import javax.xml.parsers.DocumentBuilder; | |
| import javax.xml.parsers.DocumentBuilderFactory; | |
| import javax.xml.parsers.ParserConfigurationException; | |
| import javax.xml.xpath.XPath; |
| #!/usr/bin/env ruby | |
| require 'selenium-webdriver' | |
| wd = Selenium::WebDriver.for :remote, url: 'http://10.3.1.7:4444/wd/hub', desired_capabilities: :chrome | |
| wd.navigate.to 'https://snipt.net/restrada/python-selenium-workaround-for-full-page-screenshot-using-chromedriver-2x/' | |
| # Get the actual page dimensions using javascript | |
| # | |
| width = wd.execute_script("return Math.max(document.body.scrollWidth, document.body.offsetWidth, document.documentElement.clientWidth, document.documentElement.scrollWidth, document.documentElement.offsetWidth);") |
| Copyright (C) 2011 by Colin MacKenzie IV | |
| Permission is hereby granted, free of charge, to any person obtaining a copy | |
| of this software and associated documentation files (the "Software"), to deal | |
| in the Software without restriction, including without limitation the rights | |
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| copies of the Software, and to permit persons to whom the Software is | |
| furnished to do so, subject to the following conditions: | |
| The above copyright notice and this permission notice shall be included in |
It looks like the Simulator.app binary is now signed as of Xcode 7 as the following occurs in instruments-without-delay when using the build script:
./build.sh test <SIMULATOR-UDID>
The message that we get from the kernel is:
7/23/15 12:22:52.000 PM kernel[0]: AMFI: Simulator(pid 72600) - [deny-mmap] mapped file has no team identifier and is not a platform binary: /Users/lawrencelomax/src/instruments-without-delay/build/SimShim.dylib
This causes a crash:
| @Module( | |
| complete = false, | |
| library = true, | |
| overrides = true | |
| ) | |
| public final class DebugApiModule { | |
| @Provides @Singleton ApiEndpoint provideApiEndpoint(Locale locale, @ApiEndpointMarker StringPreference apiEndpoint, | |
| @NetworkIgnoreLocale BooleanPreference ignoreLocale) { | |
| return (ignoreLocale.get()) |
| #!/bin/bash | |
| # Usage: | |
| # $ cd /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Templates | |
| # $ bash ~/remove-boilerplate-comments-from-xcode-templates.sh | |
| # Repeat for /Applications/Xcode.app/Contents/Developer/Library/Xcode/Templates | |
| find -E . -type f \ | |
| \( -regex '.*\.[chm]' -or -regex '.*\.swift' \) \ | |
| -exec sed -i '' '1,/^$/d' '{}' ';' |