Skip to content

Instantly share code, notes, and snippets.

@KamikX
KamikX / swagit.php
Created April 10, 2024 12:13 — forked from ls-dac-chartrand/swagit.php
Swag It: Reverse engineer Swagger-PHP annotations from an existing JSON payload
<?php
// -------------------------------------------------------------------------------------
// Add your JSON in the $input to generate Swagger-PHP annotation
// Inspired by: https://github.com/Roger13/SwagDefGen
// HOWTO:
// php -S localhost:8888 -t .
// http://localhost:8888/swagit.php
// -------------------------------------------------------------------------------------
@KamikX
KamikX / BleExtension.ks
Created February 4, 2021 10:00
Android check BLEv5 support
import android.bluetooth.BluetoothAdapter
import android.os.Build
import androidx.annotation.RequiresApi
@RequiresApi(Build.VERSION_CODES.O)
fun BluetoothAdapter.hasBleV5Support(): Boolean {
if (isLe2MPhySupported
|| isLeCodedPhySupported
|| isLeExtendedAdvertisingSupported
|| isLePeriodicAdvertisingSupported