-
Download and extract the latest Sniffer firmware
-
Flash the .hex file found in the
/Firmware
:$> JLinkExe -if SWD -device nrf51 h w4 0x4001e504, 0x2 w4 0x4001e50c, 0x1
loadbin ble-sniffer_nRF51822_1.0.1_1111_Sniffer.hex, 0
// @see https://www.avespeak.com/index.php?title=Choocher | |
object APIChoocher { | |
const val BASE_URL = "https://jsonplaceholder.typicode.com" | |
suspend fun posts(): JSONObject = request("api/posts") | |
suspend fun post(id: String): JSONObject = request("api/posts/$id") | |
suspend fun postCreate(title: String, body: String, userId: Int): JSONObject = | |
request("api/posts", Request.Method.POST, JSONObject(mapOf("title" to title, "body" to body, "userId" to userId))) | |
/** |
package io.matchx.lpwancontroller.api | |
import android.app.IntentService | |
import android.content.Intent | |
import android.support.v4.content.LocalBroadcastManager | |
import java.io.DataInputStream | |
import java.io.File | |
import java.io.FileOutputStream | |
import java.net.URL |
const express = require('express') | |
const bodyParser = require('body-parser') | |
const jwt = require('jsonwebtoken') | |
const mongoose = require('mongoose') | |
const User = require('./models/user') | |
mongoose.Promise = global.Promise | |
mongoose.connect('mongodb://localhost/mock_server', { useMongoClient: true }); | |
const app = express() |
mixer custom | |
mmix reset | |
mmix 0 1 -1 0.796 -1 | |
mmix 1 1 -1 -0.796 1 | |
mmix 2 1 1 0.796 1 | |
mmix 3 1 1 -0.796 -1 |
#!/bin/bash | |
if [[ "$#" -lt 1 ]]; | |
then | |
echo "Usage: $0 certificate-name [certs subfolder]" | |
exit 1 | |
fi | |
NAME=$1 |
import CoreData | |
extension NSManagedObject { | |
convenience public init(insertInto context: NSManagedObjectContext?) { | |
let name = String(describing: type(of: self)) | |
let entity = NSEntityDescription.entity(forEntityName: name, in: context!) | |
self.init(entity: entity!, insertInto: context) | |
} | |
} |
status "Generating release" | |
__sync_remote " | |
[ -f ~/.profile ] && source ~/.profile | |
set -e | |
cd $DELIVER_TO | |
if [ \"$RELEASE_CMD\" = \"rebar\" ]; then | |
echo \"using rebar to generate release\" | |
$REBAR_CMD $RELEASE_CMD_OPTIONS -f generate |
class CustomError extends Error { | |
constructor(message) { | |
super(message); // also sets .message | |
this.name = this.constructor.name; // and not 'Error' | |
Error.captureStackTrace(this, this.constructor); // remove ctor from the stacktrace | |
} | |
} | |
module.exports = CustomError; |
Download and extract the latest Sniffer firmware
Flash the .hex file found in the /Firmware
:
$> JLinkExe -if SWD -device nrf51
h
w4 0x4001e504, 0x2
w4 0x4001e50c, 0x1
loadbin ble-sniffer_nRF51822_1.0.1_1111_Sniffer.hex, 0
sudo setcap CAP_NET_BIND_SERVICE=+eip <path to your binary> |