Skip to content

Instantly share code, notes, and snippets.

@gino2010
gino2010 / OkHttp3Stack.java
Last active April 20, 2017 11:36 — forked from alashow/OkHttp3Stack.java
An OkHttp backed HttpStack for Volley (okhttp3 version)
/**
* The MIT License (MIT)
* <p>
* Copyright (c) 2015 Circle Internet Financial
* <p>
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is

In Google Developer Console inside your app project, on the Credentials section, you must create a new "Service Account" "Client ID", if you have not already. And download the JSON file.

On Google Play Developer Console you have to give permissions to "YOUR_SERVICE_ACCOUNT_EMAIL@developer.gserviceaccount.com" for uploading apks.

Installation

Download Google APIs Client Library for Python (google-api-python-client): https://code.google.com/p/google-api-python-client/ or use pip:

  $ pip install google-api-python-client
@artem-zinnatullin
artem-zinnatullin / MyApp.java
Last active January 15, 2023 13:04
If you need to set one font for all TextViews in android application you can use this solution. It will override ALL TextView's typefaces, includes action bar and other standard components, but EditText's password font won't be overriden.
public class MyApp extends Application {
@Override
public void onCreate() {
TypefaceUtil.overrideFont(getApplicationContext(), "SERIF", "fonts/Roboto-Regular.ttf"); // font from assets: "assets/fonts/Roboto-Regular.ttf
}
}
@pheuter
pheuter / sc-dl.js
Created March 5, 2012 20:44
Bookmarklet that generates download link for a Soundcloud upload
(function(d) {
var dl = d.createElement('a');
dl.innerText = 'Download MP3';
dl.href = "http://media.soundcloud.com/stream/"+d.querySelector('#main-content-inner img[class=waveform]').src.match(/\.com\/(.+)\_/)[1];
dl.download = d.querySelector('em').innerText+".mp3";
d.querySelector('.primary').appendChild(dl);
dl.style.marginLeft = '10px';
dl.style.color = 'red';
dl.style.fontWeight = 700;
})(document);