Skip to content

Instantly share code, notes, and snippets.

View funkyboy's full-sized avatar

Cesare funkyboy

View GitHub Profile
// Works
Button(action: {},
label: {
EmptyView()
})
.navigationDestination(store:
self.store.scope( ... )
)
<dict>
<key>DEFAULT-OPTIONS</key>
<dict>
<key>Level</key>
<dict>
<key>Enable</key>
<string>Debug</string>
<key>Persist</key>
<string>Debug</string>
</dict>
...
export JAVAC_DEFAULT_FLAGS="-J-Xms64m -J-XX:NewSize=4M -J-Dfile.encoding=UTF8"
export JAVA_APP_STUB=/System/Library/Frameworks/JavaVM.framework/Resources/MacOS/JavaApplicationStub
export JAVA_ARCHIVE_CLASSES=YES
export JAVA_ARCHIVE_TYPE=JAR
export JAVA_COMPILER=/usr/bin/javac
export JAVA_FOLDER_PATH=Timely.app/Java
export JAVA_FRAMEWORK_RESOURCES_DIRS=Resources
export JAVA_JAR_FLAGS=cv
export JAVA_SOURCE_SUBDIR=.
Result res = fetchThingsFromNetwork()
if res.hasError {
showError(res.error)
return
}
displayResults(res.data)
Class test = NSClassFromString(@"XCTestCase");
if (test) {
appDelegateClass = [UITestsAppDelegate class];
} else {
appDelegateClass = [AppDelegate class];
}
<div id="my-widget"></div>
<script src="https://mydomain.com/widget.js" type="text/javascript"></script>
@funkyboy
funkyboy / test.swift
Created August 6, 2018 14:46
Test recover
import UIKit
import Ably
class ViewController: UIViewController {
var serial:Int64 = 0;
var recover:String = "";
let options = ARTClientOptions()
override func viewDidLoad() {
from ably import AblyRest
client = AblyRest('YOUR_KEY')
channel = client.channels.get('push:test')
item_type = u'this is item type'
event = u'this is event'
extras = {
@funkyboy
funkyboy / AppDelegate.swift
Created June 22, 2018 10:09
Example of Ably push notifications
import UIKit
import Ably
import UserNotifications
let notificationPushReceived = Notification.Name(rawValue: "push-received")
let notificationSubscribed = Notification.Name(rawValue: "subscribed")
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate, ARTPushRegistererDelegate {
@funkyboy
funkyboy / test.py
Last active April 17, 2018 09:03
Ably Python test
# To install
# sudo pip3 install ably
# sudo pip3 install schedule
# To run `python3 test.py`
from ably import AblyRest
import random
import schedule
import time