Skip to content

Instantly share code, notes, and snippets.

@sander
sander / ancs.js
Last active February 5, 2021 16:02
BLE to stdin/stdout
var bleancs = require('ble-ancs')
var t = require('transit-js')
var writer = t.writer('json')
var reader = t.reader('json')
function status(v) {
return t.map([t.keyword('type'), t.keyword('status'),
t.keyword('value'), t.keyword(v)])}
function notif(v) {
return t.map([t.keyword('type'), t.keyword('notification'),
@darcyliu
darcyliu / iOS8InternalAppIDs.txt
Created June 10, 2016 21:32
iOS8 Internal App IDs
com.apple.SharedWebCredentialViewService
com.apple.FacebookAccountMigrationDialog
com.apple.mobilesafari
com.apple.AdSheetPhone
com.apple.share
com.apple.appleaccount.AACredentialRecoveryDialog
com.apple.Preferences
com.apple.WebContentFilter.remoteUI.WebContentAnalysisUI
com.apple.Passbook
com.apple.TrustMe
import UIKit
class ViewController: UIViewController {
var btHelper: BTHelper = BTHelper()
var timer: Timer? = nil
var bgTask = BackgroundTask()
@objc func stop() { btHelper.shutOff() }
@objc func action() { btHelper.startUp() }
import Cocoa
import CoreBluetooth
import PlaygroundSupport
public class BTHelper: NSObject, CBCentralManagerDelegate, CBPeripheralDelegate {
// BLE Access
var centralManager: CBCentralManager
override init() {
self.centralManager = CBCentralManager(delegate: nil, queue: nil)
package tw.com.acme_soft.mibandscanner;
import android.app.Activity;
import android.bluetooth.BluetoothDevice;
import android.util.Log;
import android.widget.Toast;
import com.zhaoxiaodan.miband.ActionCallback;
import com.zhaoxiaodan.miband.MiBand;
import com.zhaoxiaodan.miband.listeners.NotifyListener;
We can make this file beautiful and searchable if this error is corrected: It looks like row 9 should actually have 6 columns, instead of 3. in line 8.
Domain,Cname,Provider,IsVulnerable,IsTakenOver,Response
abroad.api.comm.intl.miui.com,abroad-api-comm-intl-303810307.ap-south-1.elb.amazonaws.com.,amazonaws,false,false,NoSuchBucket
abroad.api.comm.intl.miui.com,abroad-api-comm-intl-303810307.ap-south-1.elb.amazonaws.com.,amazonaws,false,false,The specified bucket does not exist
admin.en.miui.com,admin.en.miui.com.n.mi-dun.srv.,,true,false,Dead DNS record
api.calendar.intl.miui.com,api-calendar-intl-531084470.ap-south-1.elb.amazonaws.com.,amazonaws,false,false,NoSuchBucket
api.calendar.intl.miui.com,api-calendar-intl-531084470.ap-south-1.elb.amazonaws.com.,amazonaws,false,false,The specified bucket does not exist
api.gallery.intl.miui.com,api-gallery-intl-1897308404.ap-south-1.elb.amazonaws.com.,amazonaws,false,false,NoSuchBucket
api.gallery.intl.miui.com,api-gallery-intl-1897308404.ap-south-1.elb.amazonaws.com.,amazonaws,false,false,The specified bucket does not exist
api.content.intl.miui.com,api-content-intl-1793341579.ap-south-1.elb.amazonaws.com.,amazona
@stonehippo
stonehippo / Adafruit_nrf52_example.ino
Last active June 25, 2021 21:39
Some example Arduino IDE code showing how to do various things with Adafruit nrF52 Feather BLE
/*
* Adafruit nRF52 Feather Example
* Copyright (c) 2018-2019 George White <stonehippo@gmail.com>
*
* MIT LICENSE, see LICENSE.txt at https://gist.github.com/stonehippo/ffbed2f32e1813f4019ecedd22062636
*
* I made this example file for a coworker. It illustrates a few things:
*
* - Setting up a custom service
* - Setting up custom characteristics on that service
301 Response:{"code":1,"data":{"id":"e2519892387b49c89df17e68fc6bb8ae","url":"http://veryfitpro-test.oss-cn-shenzhen.aliyuncs.com/firmwares/71b1386bf03a47f0b116fe326198b028.zip","forceUpdate":false,"descriptionChinese":"<p>test</p>","descriptionEnglish":"<p><br></p>","version":5,"specialUpgrade":false},"message":"µƒÑÞ»óµêÉÕèƒ"}
303 Response:{"code":1,"data":{"id":"1226dea3a8a8453bba6df8babd0536d4","url":"http://veryfitpro-test.oss-cn-shenzhen.aliyuncs.com/firmwares/018e34e29a66415ab515e83a551edcf0.zip","forceUpdate":false,"descriptionChinese":"<p>Test</p>","descriptionEnglish":"<p><br></p>","version":13,"specialUpgrade":false},"message":"µƒÑÞ»óµêÉÕèƒ"}
554 Response:{"code":1,"data":{"id":"0832ebe3d3414343b60fd7a449845eb3","url":"http://veryfitpro-test.oss-cn-shenzhen.aliyuncs.com/firmwares/3d507e57ae074c20b273fee6ce56ecc9.zip","forceUpdate":false,"descriptionChinese":"<p><br></p>","descriptionEnglish":"<p>test1</p>","version":51,"specialUpgrade":false},"message":"µƒÑÞ»óµêÉÕèƒ"}
572 Response:{"code":1,"data":{
@planecore
planecore / Coronavirus.js
Last active November 11, 2022 16:27
Coronavirus Scriptable Widget
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: deep-green; icon-glyph: user-md;
// change "country" to a value from https://coronavirus-19-api.herokuapp.com/countries/
const country = "Israel"
const url = `https://coronavirus-19-api.herokuapp.com/countries/${country}`
const req = new Request(url)
const res = await req.loadJSON()
if (config.runsInWidget) {
@billiegoose
billiegoose / ArduinoSerialBypass.ino
Created July 19, 2013 01:37
Use your Arduino as a direct USB to serial converter! Tested on an Arduino Duemilanove. Probably 3.3V TTL but worked for communicating with my supposedly 5V TTL HerkuleX servo at 115200 baud.
/*
* Arduino Serial Bypass - use an Arduino as a dumb USB 2 Serial Converter
*
* This code makes the Arduino not interfere with pins 0 and 1
* which are connected to RX and TX on the FTDI chip. This allows
* the data coming from the FTDI USB 2 Serial chip to flow directly
* to another device. Since RX and TX are labeled from the Arduino's
* point of view, don't cross the wires, but plug the device's
* RX wire into the RX pin 0 and the TX wire into the TX pin 0.
*