Skip to content

Instantly share code, notes, and snippets.

Avatar

Cesare funkyboy

View GitHub Profile
View gist:e6ccc5150ac5a39c613e85e9a7ab20ff
<dict>
<key>DEFAULT-OPTIONS</key>
<dict>
<key>Level</key>
<dict>
<key>Enable</key>
<string>Debug</string>
<key>Persist</key>
<string>Debug</string>
</dict>
View gist:235bf600ac860fc022c758e5d59d81fa
...
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=.
View gist:02964fb2ef40c5a9121c35b23ab1790f
Result res = fetchThingsFromNetwork()
if res.hasError {
showError(res.error)
return
}
displayResults(res.data)
View gist:d612d435ac9e61b9519cb109244f0a15
Class test = NSClassFromString(@"XCTestCase");
if (test) {
appDelegateClass = [UITestsAppDelegate class];
} else {
appDelegateClass = [AppDelegate class];
}
View widget.html
<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
View test.swift
import UIKit
import Ably
class ViewController: UIViewController {
var serial:Int64 = 0;
var recover:String = "";
let options = ARTClientOptions()
override func viewDidLoad() {
View ably-push.py
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
View AppDelegate.swift
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
View test.py
# 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
View Podfile
target 'AblyTest' do
use_frameworks!
pod 'Ably', :git => 'https://github.com/ably/ably-ios.git', :branch => 'fix-memory-consumption-bug'
end