View imagekit
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
curl --request POST \ | |
--url https://api.imagekit.io/v1/files/upload \ | |
--header 'content-type: multipart/form-data; boundary=---011000010111000001101001' \ | |
--form fileName=user-21.jpg \ | |
--form publicKey=sZ/a9Az1UFoCCZs4xJvJrcsTGLs= \ | |
--form signature=f5a779108454d224cb9ab4fe1ebb52f44fb19b70 \ | |
--form token=d502bf6a-1aac-4bd4-8241-845db283f05a \ | |
--form expire=1567694190 \ | |
--form useUniqueFilename=true \ | |
--form isPrivateFile=true \ |
View 1.kt
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
interface ProductApi { | |
@GET("categories") | |
fun categories(): Observable<Response<List<CategoryData>>> | |
@GET("produitscat") | |
fun products(): Observable<Response<List<ProductData>>> | |
} | |
View bluetooth.py
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
#!/usr/bin/python | |
from __future__ import absolute_import, print_function, unicode_literals | |
import dbus | |
import dbus.mainloop.glib | |
try: | |
from gi.repository import GObject | |
except ImportError: | |
import gobject as GObject |
View Parse.kt
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
override fun queryPosts(tab: FeedTabController.Tab): Observable<List<Post>> { | |
val postsQuery = ParseQuery.getQuery<ParseObject>("Post") | |
.whereExists("createdAt") | |
.whereExists("building") | |
.whereExists("author") | |
.include("building") | |
.include("photo") | |
.include("author") | |
.include("author.Picture") | |
.whereEqualTo("building", ParseObject.createWithoutData("Building", sessionManager.buildingId)) |
View AM.xml
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
<manifest | |
package="io.bimapp" | |
xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:tools="http://schemas.android.com/tools"> | |
<uses-permission android:name="android.permission.INTERNET"/> | |
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/> | |
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/> | |
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/> |
View Controller
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
override fun onAttach(view: HomeView) { | |
view.events() | |
.flatMap(this::processEvent) | |
.subscribe(view::render) | |
.toDisposeBag() | |
} | |
private fun processEvent(event: HomeViewEvent): Observable<HomeViewModel> = when (event) { | |
is HomeViewEvent.MapReady -> Observable.empty() | |
is HomeViewEvent.MapRefresh -> loadStations(event.bounds) |
View feedquery.kt
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
val postsQuery = ParseQuery.getQuery<ParseObject>("Post") | |
.whereExists("createdAt") | |
.whereExists("building") | |
.whereExists("author") | |
.include("building") | |
.include("photo") | |
.include("author") | |
.include("author.Picture") | |
.whereEqualTo("building", ParseObject.createWithoutData("Building", sessionManager.buildingId)) | |
.setLimit(QUERY_LIMIT) |
View Logs
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
SocketService D socket emit: [join island] | |
SocketService D socket ack: [join island] | |
MessagingService D join island success: [c07021b0-197d-11e7-8b1b-f1f5942855ad_anonymous] | |
SocketService D socket emit: [device token] | |
SocketService D socket on: [update people] | |
D socket on: [prepend chat] | |
D socket on: [add person] | |
D socket ack: [device token] | |
MessagingService D update person content: {"action":"add person","island":{"id":"c07021b0-197d-11e7-8b1b-f1f5942855ad","name":"Barney's","c | |
hannel":"c07021b0-197d-11e7-8b1b-f1f5942855ad_anonymous","room":"anonymous","room_id":1,"anonymous":true,"expira |
View Login.swift
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
// CONFIGURATION | |
let authorityUrl = "https://sts.ophtalmic.fr/adfs" | |
let redirectUri = "http://anarbitraryreturnuri" | |
let resourceUri = "http://myadfsblister/webapi" | |
let clientId = "E1CF1107-FF90-4228-93BF-26052DD2C714" | |
// STEP 1: AUTHENTIFICATION | |
let authContext = ADAuthenticationContext(authority: authorityUrl, validateAuthority: false, error: nil) |
View step 1: get token
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
+ (void)getToken:(void (^)(NSString*))completionBlock; | |
{ | |
ADAuthenticationError *error = nil; | |
authContext = [ADAuthenticationContext authenticationContextWithAuthority:@"https://login.microsoftonline.com/common" | |
error:&error]; | |
[authContext acquireTokenWithResource:@"https://graph.windows.net" | |
clientId:@"<Your Client ID>" // Comes from App Portal | |
redirectUri:[NSURL URLWithString:@"<Your Redirect URI>"] // Comes from App Portal | |
completionBlock:^(ADAuthenticationResult *result) |