Skip to content

Instantly share code, notes, and snippets.

View searock's full-sized avatar
:octocat:

Searock Ruzario searock

:octocat:
  • Chile
View GitHub Profile
@ditn
ditn / ktlint.gradle.kts
Created December 7, 2018 12:53
ktlint with Gradle Kotlin DSL
val ktlint by configurations.creating
dependencies {
ktlint(Libraries.ktlint)
}
tasks.register<JavaExec>("ktlint") {
group = "verification"
description = "Check Kotlin code style."
classpath = ktlint
@jkeefe
jkeefe / raspberry-pi-ble-sniffer.md
Last active September 16, 2023 14:33
Notes on using Adafruit's "Bluefruit" BLE sniffer with a Raspberry Pi

BLUETOOTH SNIFFER

Working to sniff Bluetooth Low Energy with the adafruit sniffer

For more information, see this blog post

Going the python route, as described here

before installing pySerial, did ...

@benvium
benvium / retrofit-custom-error-handling.java
Created August 29, 2014 19:45
Fairly simply Retrofit custom error handling example. Is set up so that you don't need to do much work in the 'failure' handler of a retrofit call to get the user-visible error message to show. Works on all endpoints. There's lots of exception handling as our server folks like to keep us on our toes by sending all kinds of random stuff..!
// on error the server sends JSON
/*
{ "error": { "data": { "message":"A thing went wrong" } } }
*/
// create model classes..
public class ErrorResponse {
Error error;