Skip to content

Instantly share code, notes, and snippets.

View stephendonner's full-sized avatar

Stephen Donner stephendonner

View GitHub Profile
@stephendonner
stephendonner / fix-xcode
Created August 28, 2019 20:03 — forked from rnapier/fix-xcode
Links Xcode SDKs from the /SDKs directory (which you maintain yourself)
#!/usr/bin/python
# fix-xcode
# Rob Napier <robnapier@gmail.com>
# Script to link in all your old SDKs every time you upgrade Xcode
# Create a directory called /SDKs (or modify source_path).
# Under it, put all the platform directories:
# MacOSX.platform iPhoneOS.platform iPhoneSimulator.platform
# Under those, store the SDKs:

adb and fastboot must know

Install android SDK (bottom of the page) or full android studio if you need to develop on android.

fastboot looks like adb but it is used when device is in bootloader (or fastboot).

Check connected devices

adb:

driver = webdriver.Firefox()
driver.get('https://pypi.org')
with driver.context('chrome'):
driver.find_element_by_css_selector('image#pageActionButton').click()
driver.find_element_by_css_selector('#pageAction-panel-screenshots').click()
with driver.context(driver.CONTEXT_CONTENT):
sleep(2)
onboarding = driver.find_element_by_id('firefox-screenshots-onboarding-iframe')
driver.switch_to.frame(onboarding)
driver.find_element_by_id('skip').click()
@stephendonner
stephendonner / trrprefs.md
Created May 18, 2018 02:16 — forked from bagder/trrprefs.md
trr prefs

Preferences

All preferences for the DNS-over-HTTPS functionality in Firefox are located under the "network.trr" prefix (TRR == Trusted Recursive Resolver). The support for these landed in Firefox 60 but will be polished further in 61.

network.trr.mode

set which resolver mode you want.

0 - Off (default). use standard native resolving only (don't use TRR at all)

1 - Race native against TRR. Do them both in parallel and go with the one that returns a result first.

@stephendonner
stephendonner / trrprefs.md
Created May 3, 2018 21:00 — forked from mcmanus/trrprefs.md
trr prefs

Preferences

All preferences for the DNS-over-HTTPS (DoH) functionality in Firefox are located under the "network.trr" prefix (TRR == Trusted Recursive Resolver). The support for these landed in Firefox 60 and has been improved in Firefox 61. Goto about:config to set these preferences.

Some users have reported needing to restart to have the changes take effect. The DNS tab of the about:networking page will indicate whether a name was resolved via TRR or not.

network.trr.mode

set this preference to 2 to enable DoH in a mode where DoH is used as the first choice for DNS, but it will still fallback to native DNS for full backwards compatibility. Set to 0 to disable DoH.