This file contains hidden or 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
/* Set Last Action */ | |
public App() | |
{ | |
// Global handler for uncaught exceptions. | |
BugSenseHandler.Instance.Init(this, "YOUR_API_KEY"); | |
BugSenseHandler.SetLastBreath(MyMethod); | |
// ...do more stuff... | |
} |
This file contains hidden or 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
/* | |
* Alternatively you can initialize the plugin to work | |
* along with the Visual Studio debugger | |
*/ | |
public App() | |
{ | |
// Global handler for uncaught exceptions. | |
BugSenseHandler.Instance.Init(this, "YOUR_API_KEY", new NotificationOptions() { HandleWhileDebugging = true }); | |
} |
This file contains hidden or 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
/* Send event */ | |
BugSenseHandler.Instance.SendEvent("anEvent"); |
This file contains hidden or 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
/* Localized fix notifications */ | |
BugSenseHandler.SetLocalizedFixNotifications( | |
"Un correctif est disponible", // Title | |
"S\'il vous plaît mettre à jour à la version dernière" // Content | |
); |
This file contains hidden or 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
public App() | |
{ | |
this.InitializeComponent(); | |
this.Suspending += OnSuspending; | |
// Initialize BugSense | |
BugSenseHandler.Instance.Init(this, "YOUR_API_KEY"); | |
} |
This file contains hidden or 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
{ | |
"order": "created", | |
"total": 1, | |
"filters": { | |
"status": "new", | |
"appver": null, | |
"tag": null, | |
"osver": null | |
}, | |
"error": null, |
This file contains hidden or 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
{ | |
"stacktrace": [ | |
"java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState", | |
"at android.app.FragmentManagerImpl.checkStateLoss(FragmentManager.java:1265)", | |
"at android.app.FragmentManagerImpl.popBackStackImmediate(FragmentManager.java:451)", | |
"at android.app.Activity.onBackPressed(Activity.java:2121)", | |
"at dalvik.system.NativeStart.main(Native Method)" | |
], | |
"error": { | |
"resolved": null, |
This file contains hidden or 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
# -*- coding: utf-8 -*- | |
""" | |
bugsense_cli.py | |
~~~~ | |
Sample script to upload dSYMSs and access the Read API | |
:version: 0.1 | |
:copyright: 2013 by bugsense.com. | |
""" | |
from urllib import quote |
This file contains hidden or 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
private static String generateUid() { | |
// STEP 1: get time since Epoch. | |
// OUTPUT: timestamp in millisecond (or finer) granularity. | |
// RATIONALE: collision only when app is deployed at the exact same time. | |
final String s1 = Long.valueOf((new Date()).getTime()).toString(); | |
// STEP 2: get an object reference. | |
// OUTPUT: memory address or another distinguishable object property. | |
// RATIONALE: very little probability for two runs to get the | |
// same address (debatable when in a sandbox). |
This file contains hidden or 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 stripe | |
import collections | |
from texttable import Texttable | |
# TODO add pagination | |
# I will update this gist shortly when pagination is added | |
stripe_customers = stripe.Customer.all(count=100) | |
by_status = collections.defaultdict(list) |