Skip to content

Instantly share code, notes, and snippets.

View PanosJee's full-sized avatar

Panos Papadopoulos PanosJee

View GitHub Profile
@PanosJee
PanosJee / bugsense_cli.py
Last active August 29, 2015 13:56
Upload Proguard Mappings files to BugSense via API
# -*- 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
# run atos
sub symbolize_frames {
my ($images,$bt) = @_;
# create mapping of framework => address => bt frame (adjust for slid)
# and for framework => arch
my %frames_to_lookup = ();
my %arch_map = ();
my %base_map = ();
@PanosJee
PanosJee / gist:d2e3d8160ceb5eef9685
Created June 20, 2014 21:13
Get last day errors across all BugSense projects
import requests
import json
base = 'https://www.bugsense.appspot.com'
def get_all_projects(token, **kwargs):
from datetime import datetime, timedelta
timestamp = (datetime.utcnow() - timedelta(days=1)).replace(hour=23,minute=59,second=59)
base_url = "%s/api/v1/projects.json" % (base)
### Keybase proof
I hereby claim:
* I am panosjee on github.
* I am panosjee (https://keybase.io/panosjee) on keybase.
* I have a public key whose fingerprint is 3979 5DB8 0196 2BD4 47F4 7FFA 8BE3 A860 4568 46CE
To claim this, I am signing this object:
@PanosJee
PanosJee / css
Created February 25, 2015 00:46
#image_overlay_panel .image{
background: transparent 50% 50% no-repeat url('https://www.dropbox.com/s/9556bq4h0bnd7q0/retail_floor_plan.jpg?dl=0');
min-height: 500px;
}
#image_overlay_panel .dashboard-panel {
position: relative;
height: 520px;
}
#image_overlay_panel .panel-element-row {
width: 1200px;
@PanosJee
PanosJee / gist:68a53703c0c44a7efb8c
Created April 15, 2015 21:40
Splunk MINT iOS web view
// Initialize WebView programmatically
MintUIWebView *webView = [[MintUIWebView alloc] init];
// Or initialize WebView from Interface Builder
//Go to the identity inspector, and change the class from UIWebView to MintUIWebView
// Enable Hybrid
[webView setDelegate:self];
//MintWKWebView
require 'rubygems'
require 'activesupport'
$KCODE = 'u'
class String
# Converts the Greek Unicode characters contained in the string
# to latin ones (aka greeklish) and returns self.
# For unobstructive conversion call the non-bang method 'greeklish'
#
# example:
From 1ca98a37b38a07387fc4344ce9df8db0a2885057 Mon Sep 17 00:00:00 2001
From: Panagiotis Papadopoulos <panos@socialcaddy.com>
Date: Tue, 29 Jun 2010 19:50:20 +0300
Subject: [PATCH] Added support for multiple query parameters with the same name
---
oauth/oauth.py | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/oauth/oauth.py b/oauth/oauth.py
def connect_to_gmail(CREDENTIALS, email, oauth_token, oauth_token_secret):
"""
Call this function to get an authenticated IMAP connection
"""
consumer = OAuthEntity(CREDENTIALS[0], CREDENTIALS[1])
access_token = OAuthEntity(oauth_token, oauth_token_secret)
xoauth_string = GenerateXOauthString(
consumer, access_token, email, 'imap',
None, str(random.randrange(2**64 - 1)), str(int(time.time())))
def _process_body(pl):
"""find the final payload (body) of an email"""
if type(pl)==StringType:
return pl.replace('\r\n>',' ').replace('\r\n',' ').replace('\n\n',' ')
elif type(pl)==list:
return _process_body(pl[0])
elif type(pl)==InstanceType:
return _process_body(pl._payload)
else:
print type(pl)