Skip to content

Instantly share code, notes, and snippets.

View leontiy's full-sized avatar

Leon Deriglazov leontiy

  • JPMorgan Chase & Co.
  • London, UK
View GitHub Profile
Intent sendIntent = new Intent(Intent.ACTION_SEND);
sendIntent.setType("image/png"); //or "message/rfc822"
ContentResolver cr = getContentResolver();
sendIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse(status.url));
String postfix = (status.recognized()) ? "success" : "failure";
sendIntent.putExtra(Intent.EXTRA_SUBJECT, "Captured images: " + postfix);
sendIntent.putExtra(Intent.EXTRA_EMAIL, new String[] { "[email protected]" });
startActivity(Intent.createChooser(sendIntent, "Send images"));
#!/usr/local/bin/python3.0
import os
import re
def skip_updated(input):
for line in input:
if not_updated_regexp.match(line):
return
#!/bin/bash
USAGE="usage: git-gc-all [repositories_directory]"
if [[ -z $1 ]]; then
wd=`pwd`
elif [[ $1 == "--help" ]]; then
echo "runs git-gc in each subdirectory of current directory."
echo $USAGE
exit