Skip to content

Instantly share code, notes, and snippets.

@bootstraponline
bootstraponline / Dockerfile
Created April 21, 2018 05:57 — forked from junderw/Dockerfile
Dockerfile for running keybase in a container... requires KEYBASEUSER.ss config.json secretkeys.KEYBASEUSER.mpack session.json in the same directory as the Dockerfile... also, if you ever logout, the session.json will change.
FROM ubuntu:16.04
MAINTAINER Jonathan Underwood
# set env vars for linux user and keybase user
ENV LINUX_USER="kbuser" \
KEYBASE_USER="youruser"
# use curl to grab the latest build from keybase.io
RUN apt update && apt install -y \
curl
import android.os.Build
import android.view.View
import io.github.inflationx.viewpump.InflateResult
import io.github.inflationx.viewpump.Interceptor
import javax.inject.Inject
class AutofillKillerInterceptor : Interceptor {
override fun intercept(chain: Interceptor.Chain): InflateResult {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O) {
@bootstraponline
bootstraponline / FinishingActivityTestRule.java
Created January 27, 2017 18:02 — forked from drewhannay/FinishingActivityTestRule.java
Android Espresso Activity Clean Up
/**
* Copyright (C) 2017 Drew Hannay
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software
@bootstraponline
bootstraponline / pull_request_no_newline.js
Created July 13, 2016 21:18
Find missing newlines in GitHub pull requests
$$('.octicon-no-newline')
@bootstraponline
bootstraponline / remove-boilerplate-comments-from-xcode-templates.sh
Created May 26, 2016 20:57
Remove Useless Header comments from Xcode Templates
#!/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' '{}' ';'
@bootstraponline
bootstraponline / DebugApiModule.java
Created February 3, 2016 16:07 — forked from mkuprionis/DebugApiModule.java
Retrofit API wrapper to be used when testing with Espresso
@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())

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:

@bootstraponline
bootstraponline / LICENSE
Created November 19, 2015 17:57 — forked from sinisterchipmunk/LICENSE
tar, gzip, and untar files using ruby in memory without tempfiles
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
=begin
Nov 2 2015
https://docs.saucelabs.com/reference/test-configuration/#specifying-the-screen-resolution
Valid values for Windows XP and Windows 7 are:
800x600 1024x768 1052x864 1152x864 1280x800 1280x960 1280x1024 1400x1050 1440x900 1600x1200 1680x1050 1920x1200 2560x1600
Valid values for OS X 10.8 are:
1024x768 1152x864 1152x900 1280x800 1280x1024 1376x1032 1400x1050 1600x1200 1680x1050 1920x1200