Skip to content

Instantly share code, notes, and snippets.

Avatar

Arnaud Piroelle ArnaudPiroelle

View GitHub Profile
View docker-compose.yml
version: "3"
services:
jackett:
container_name: jackett
image: linuxserver/jackett
ports:
- 9117:9117
environment:
- TZ=Europe/Paris
- PUID=1000
View FutureUtils.kt
package io.robotsdk.model.coroutines.utils
import com.aldebaran.qi.Future
import java.util.concurrent.CancellationException
import kotlin.coroutines.Continuation
import kotlin.coroutines.resume
import kotlin.coroutines.resumeWithException
import kotlin.coroutines.suspendCoroutine
suspend fun <T> Future<T>.await(): T {
View QiSDK.kt
onRobot {
// Get a single service
val conversation: Conversation = getService()
val osef = conversation.makeSay(robotContext, Phrase("Hello"))
// Make a simple say
val say: Say = say("Hello you !")
// Wait for focus before start a action
View AppDelegate+Notifications.swift
import Foundation
import Firebase
extension AppDelegate {
func setupNotifications(application: UIApplication) {
FIRApp.configure()
let settings: UIUserNotificationSettings = UIUserNotificationSettings(forTypes: [.Alert, .Badge, .Sound], categories: nil)
application.registerUserNotificationSettings(settings)
View Examples.swift
let thumbnail: UIImageView = ...
thumbnail.rx_setImage(url: URL(string: currentVideo.thumbnail)!, placeholderImage: UIImage(named: "Placeholder Video"), animated: true)
let params: QueryParameters = ["key": "value"]
let headers: Headers = ["key", "value"]
RxNetwork.request("http://www.google.com", headers: headers).asData()
.subscribe(onNext: { data in
// Use data as Data
})
View Examples.swift
let thumbnail: UIImageView = ...
thumbnail.rx_setImage(url: URL(string: currentVideo.thumbnail)!, placeholderImage: UIImage(named: "Placeholder Video"))
RxNetwork.withData<Model>(URLRequest(url: url!))
.subscribe(onNext: { data in
// Use data as Data
})
let videoObservable : Observable<Video> = RxNetwork.withJSON(URLRequest(url: url!))