Skip to content

Instantly share code, notes, and snippets.

@ifinoi
ifinoi / gist:5030684
Last active December 14, 2015 04:49
add repo details to the pom.xml file
<repositories>
<!-- other repositories here -->
<repository>
<id>bugsense repo</id>
<name>The BugSense Repository</name>
@ifinoi
ifinoi / gist:5030669
Created February 25, 2013 15:38
Maven dependency
<dependencies>
<!-- other dependencies here -->
<dependency>
<groupId>com.bugsense.trace</groupId>
<artifactId>bugsense</artifactId>
<version>3.2</version>
</dependency>
@ifinoi
ifinoi / gist:4474902
Created January 7, 2013 13:20
LastBreath for WindowsPhone 8
* Set Last Action */
public App()
{
// Global handler for uncaught exceptions.
BugSenseHandler.Instance.Init(this, "YOUR_API_KEY");
BugSenseHandler.SetLastBreath(MyMethod);
// ...do more stuff...
}
@ifinoi
ifinoi / gist:4474515
Created January 7, 2013 12:05
Implementation of LastBreath in game
public class MyGame extends Activity implements ExceptionCallback {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
//Init BugSense
BugSenseHandler.initAndStartSession(this, APIKEY);
//Set the exception callback
BugSenseHandler.setExceptionCallback(this);
@ifinoi
ifinoi / gist:4474491
Created January 7, 2013 12:00
Set your activity as the current ExceptionCallback
BugSenseHandler.setExceptionCallback(this);
@ifinoi
ifinoi / gist:4474476
Created January 7, 2013 11:58
Add a public void method called lastBreath() in your code
@Override
public void lastBreath() {
//do or save stuff here
}
@ifinoi
ifinoi / gist:4474471
Created January 7, 2013 11:57
Let your Activity implement BugSense’s ExceptionCallback.
public class MainActivity extends Activity implements ExceptionCallback {
}
@ifinoi
ifinoi / sample_uuid.c
Created November 13, 2012 14:44
sample_uuid.c
/*
* File: sample_uuid.c
*
* Unique User ID (UUID) entropy-based generator with 6 DOF
* by D. G. Kakolyris - dgk@bugsense.com
* 2012-05-11
*
* C (on Linux) sample implementation [requires glibc2 or higher]
*/
@ifinoi
ifinoi / gist:4059747
Created November 12, 2012 14:35
Custom analyzer
"settings" : {
"analysis" : {
"analyzer" : {
"msg_search_analyzer" : {
"tokenizer" : "keyword",
"filter" : ["lowercase"]
},
"msg_index_analyzer" : {
"tokenizer" : "keyword",
@ifinoi
ifinoi / gist:4059742
Created November 12, 2012 14:34
Explicit mapping
"properties" : {
"message" : {"type" : "string", "search_analyzer" : "msg_search_analyzer", "index_analyzer" : "msg_index_analyzer"},
"file" : {"type" : "string", "analyzer" : "simple"},
"api-key": {"type" : "string", "index" : "not_analyzed"},
...
"osver" : {"type" : "string", "index" : "not_analyzed"},
"customdata" : {"type" : "string", "analyzer" : "simple"},
"updated" : {"type":"date", "format":"date"}
}