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:
development:
enable_star: 1
min_infix_len: 3
morphology: stem_en
html_strip: 1
charset_type: utf-8
charset_table: "0..9, a..z, _, A..Z->a..z, U+37a, U+386..U+389->U+3ac..U+3af, U+38c..U+38e->U+3cc..U+3ce, U+390,U+391..U+3a1->U+3b1..U+3c1, U+3a3..U+3ab->U+3c3..U+3cb, U+3ac..U+3ce,U+3d0..U+3d7, U+3d8..U+3ef/2, U+3f0..U+3f3, U+3f4->U+3b8, U+3f5, U+3f7..U+3f8/2, U+3f9->U+3f2, U+3fa..U+3fb/2, U+3fc..U+3ff"
bin_path: '/usr/local/bin'
sql_sock: '/tmp/mysql.sock'
test:
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())))