Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am mukgupta on github.
  • I am mukgupta (https://keybase.io/mukgupta) on keybase.
  • I have a public key ASD4iu717OKYGE4QAxg_Cpr33RyIfsHwsq5dULFUUp9I2go

To claim this, I am signing this object:

@mukgupta
mukgupta / README-Template.md
Created July 12, 2018 10:26 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@mukgupta
mukgupta / keybase.md
Created February 9, 2017 07:56
keybase.md

Keybase proof

I hereby claim:

  • I am mukgupta on github.
  • I am mukgupta (https://keybase.io/mukgupta) on keybase.
  • I have a public key ASBRcXF8DPS18tWTyrE_2aATHKLzzDVQ-RDdfgYyrBFQ2go

To claim this, I am signing this object:

@mukgupta
mukgupta / RavenAngularHTTPInterceptor.js
Created May 22, 2014 09:03
AngularJs log HTTP Errors using Sentry
myApp.factory('RavenHTTPInterceptor', ['Raven', '$q', function(Raven, $q) {
var httpIgnoreErrors = [401]; //Error codes to be ignored
var ignoreError = function(error){
return httpIgnoreErrors.indexOf(error) !== -1;
}
return {
// optional method
@mukgupta
mukgupta / RavenJSCapture.js
Created May 21, 2014 16:47
Raven Capture Error
// record a simple message
Raven.captureMessage('hello world!')
// capture an exception
try {
errorThrowingCode();
} catch(err) {
Raven.captureException(err);
}
@mukgupta
mukgupta / RavenCeleryInstalledApp.py
Created May 21, 2014 15:48
Raven Celery Package
# Add raven to the list of installed apps
INSTALLED_APPS = INSTALLED_APPS + (
# ...
'raven.contrib.django.celery ',
)
@mukgupta
mukgupta / CeleryLogger.py
Created May 21, 2014 15:46
Raven Celery Logging
LOGGING = {
'version': 1,
'disable_existing_loggers': True,
'root': {
'level': 'WARNING',
'handlers': ['sentry'],
},
'formatters': {
'verbose': {
'format': '%(levelname)s %(asctime)s %(module)s %(process)d %(thread)d %(message)s'
@mukgupta
mukgupta / djangoraven.py
Created May 21, 2014 15:29
Django Raven Settings
# Set your DSN value
RAVEN_CONFIG = {
'dsn': 'YOUR_DSN_KEY',
}
# Add raven to the list of installed apps
INSTALLED_APPS = INSTALLED_APPS + (
# ...
'raven.contrib.django.raven_compat',
)
@mukgupta
mukgupta / ravenuser.js
Created May 21, 2014 15:21
Raven-js Associate User
Raven.setUser({
"id": 'UNIQUE_USER_ID',
"email": 'USER_EMAIL'
})
@mukgupta
mukgupta / angular.js
Created May 21, 2014 15:13
Raven-js Angularjs plugin
/**
* Angular.js plugin
*
* Provides an $exceptionHandler for Angular.js
*/
;(function(Raven, angular) {
'use strict';
// quit if angular isn't on the page
if (!angular) {