This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;Inspired by: | |
; https://gist.github.com/bogdibota/062919938e1ed388b3db5ea31f52955c | |
; https://stackoverflow.com/questions/34177547/detect-if-visual-c-redistributable-for-visual-studio-2013-is-installed | |
; https://stackoverflow.com/a/54391388 | |
; https://github.com/GitCommons/cpp-redist-nsis/blob/main/installer.nsh | |
;Find latests downloads here: | |
; https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist | |
!include LogicLib.nsh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class YTEmbed extends HTMLElement { | |
static get observedAttributes() { return ['videoid', 'ratio']; } | |
constructor() { | |
super(); | |
this.shadow = this.attachShadow({mode: "open"}); | |
this.redraw(); | |
} | |
attributeChangedCallback(name, oldValue, newValue) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.bluetooth.BluetoothAdapter | |
import android.bluetooth.BluetoothDevice | |
import io.reactivex.Observable | |
import java.util.concurrent.TimeUnit | |
data class BLEScanResult(val dev: BluetoothDevice, | |
val rssi: Int, | |
val scanRecord: ByteArray) | |
fun rxBLEScanner(btAdapter: BluetoothAdapter, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.view.Choreographer | |
import io.reactivex.Observable | |
import io.reactivex.Single | |
import io.reactivex.android.schedulers.AndroidSchedulers | |
val vsync: Observable<Long> = { | |
Single.create<Long>{emitter -> | |
Choreographer.getInstance().postFrameCallback{emitter.onSuccess(it)} | |
} | |
.toObservable() |