Or: “Everybody likes being given a glass of water.”
By Merlin Mann.
It's only advice for you because it had to be advice for me.
#!/usr/bin/env python3 | |
# De-redacts PDF's that have been redacted by drawing PDF-native rectangles over the text | |
# This removes ALL rectangles so might also nuke any shape diagrams a bit | |
# python deredactatron.py a_redacted_doc.pdf | |
# Outputs: deredacted-a_redacted_doc.pdf | |
import sys | |
import re |
#!/bin/bash | |
while getopts y: flag | |
do | |
case "${flag}" in | |
y) size=${OPTARG};; | |
esac | |
done | |
DEVICES=`adb devices | grep -v devices | grep device | cut -f 1` |
/* | |
* ---------------------------------------------------------------------------- | |
* "THE BEER-WARE LICENSE" (Revision 42): | |
* Sebastiano Poggi wrote this file. As long as you retain this notice you | |
* can do whatever you want with this stuff. If we meet some day, and you think | |
* this stuff is worth it, you can buy me a beer in return. Seb | |
* ---------------------------------------------------------------------------- | |
* Feel free to attribute this code in compiled products if you feel like it, | |
* but it's not required. | |
*/ |
var Twit = require("twit"); | |
var config = require('./oauthconfig'); | |
console.log("config:"); | |
console.log(config); | |
var T = new Twit({ | |
consumer_key: config.consumer_key, | |
consumer_secret: config.consumer_secret, | |
access_token: config.access_token, |
Quickly deploy Volley to your maven repository. Volley is a library that makes networking for Android apps easier and most importantly, faster. For an example to use Volley in your app, check out Folly.
git clone https://android.googlesource.com/platform/frameworks/volley
cd volley
(download the pom.xml)
mvn clean install
I just had to set up Jenkins to use GitHub. My notes (to myself, mostly):
For setting up Jenkins to build GitHub projects. This assumes some ability to manage Jenkins, use the command line, set up a utility LDAP account, etc. Please share or improve this Gist as needed.
protected String[] doInBackground(String... credentials) { | |
String consumer_secret = mActivity.getString(R.string.oauth_consumer_secret); | |
HttpClient client = new DefaultHttpClient(); | |
HttpPost request = new HttpPost("https://www.instapaper.com/api/1/oauth/access_token"); | |
CommonsHttpOAuthConsumer consumer = new CommonsHttpOAuthConsumer(mActivity.getString(R.string.oauth_consumer_key), | |
consumer_secret); | |
List<BasicNameValuePair> params = Arrays.asList( | |
new BasicNameValuePair("x_auth_username", credentials[0]), | |
new BasicNameValuePair("x_auth_password", credentials[1]), | |
new BasicNameValuePair("x_auth_mode", "client_auth")); |