Skip to content

Instantly share code, notes, and snippets.

@danylokos
danylokos / converter.py
Created December 5, 2019 20:56
Converts Keras .h5 model to CoreML .mlmodel'
#!/usr/bin/env python
'''
./converter.py \
--model model.h5 \
--desc "Predicts either a phone is in the hands or in a pocket" \
--input_desc "Sensor samples (acc, gyro, mag, 50Hz)" \
--output_desc "1 - phone in the hands, 0 - phone in a pocket" \
--author "Danylo Kostyshyn" \
--license="MIT"
@danylokos
danylokos / ent.xml
Created November 13, 2020 16:51
debug server entitlements
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.backboardd.debugapplications</key>
<true/>
<key>com.apple.backboardd.launchapplications</key>
<true/>
<key>com.apple.diagnosticd.diagnostic</key>
<true/>
@danylokos
danylokos / tips.md
Last active October 18, 2025 03:43
Debugging 3rd party apps on iOS and Android

Debugging 3rd party apps on iOS and Android

Part I: iOS

Prerequisites

  • checkra1n
    • A7 - A10 devices (iPhone 5s - iPhone X), iOS 12.0+
    • Dropbear SSH, port 44, root:alpine
  • USB multiplexing daemon usbmuxd (available via brew)
  • Use scp to copy file to/from device

Forward remote (iDevice) port 44 (Dropbear SSH) to local (Mac) 2222

@danylokos
danylokos / demo.swift
Created December 24, 2020 15:19
swift multi protocol error
/*
compilation error:
Type 'StructC' does not conform to protocol 'ProtoA'
Type 'StructC' does not conform to protocol 'ProtoB'
*/
protocol ProtoAInput {
{
"Key Mappings": {
"0xf702-0x320000": {
"Text": "",
"Action": 33
},
"0xf702-0x300000": {
"Text": "0x01",
"Action": 11
},