Skip to content

Instantly share code, notes, and snippets.


Karl Nosworthy KarlNosworthy

View GitHub Profile
KarlNosworthy / build.gradle
Last active Aug 29, 2015
A default build.gradle file for Android apps that includes dependency injection support, headless testing and mocks for CI and AssertJ to make testing sweeter.
View build.gradle
buildscript {
repositories {
dependencies {
classpath ''
classpath 'com.jakewharton.sdkmanager:gradle-plugin:0.12.0'
classpath 'org.robolectric:robolectric-gradle-plugin:0.13.0'
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.4'
KarlNosworthy / .travis.yaml
Created Oct 16, 2014
Simple Travis CI script for Android builds
View .travis.yaml
language: android
jdk: oraclejdk7
- chmod +x gradlew
script: ./gradlew check
View .gitignore
# gimpy mac thingy
# IDEA Ignores
# Local configuration file (sdk path, etc)
KarlNosworthy / gist:f024b3ae415da247e06e
Created Dec 16, 2014
Search to find popular, public Java based projects with issues in Github.
View gist:f024b3ae415da247e06e
language:java type:issue is:public stars:">=20"
KarlNosworthy / NSMutableAttributedStringExtension.swift
Created Feb 17, 2015
An attributed string extension which provides a new method to simply find and make links out of specified strings.
View NSMutableAttributedStringExtension.swift
import Foundation
extension NSMutableAttributedString {
public func setAsLink(textToFind:String, linkURL:String) -> Bool {
let foundRange = self.mutableString.rangeOfString(textToFind)
if foundRange.location != NSNotFound {
self.addAttribute(NSLinkAttributeName, value: linkURL, range: foundRange)
return true
KarlNosworthy / gist:acba2452a67617ee079b
Created Jul 18, 2015
Pulling a sqlite databases from a non rooted android device
View gist:acba2452a67617ee079b
# Copy the database from its standard location to the sd card
adb -d shell "run-as <> cat /data/data/<>/databases/<> /sdcard/<>"
# Pull the database from the sdcard to a specified local filename or the current directory if not
adb pull /sdcard/<> [<>]