Skip to content

Instantly share code, notes, and snippets.

Avram Lyon avram

Block or report user

Report or block avram

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@avram
avram / csv2zotero.py
Created Jul 16, 2011
Script to batch-add items defined in a CSV file to Zotero
View csv2zotero.py
#!/usr/bin/python
# -*- coding: utf8 -*-
# We'll use the pyzotero project for server access
# See packages.python.org/Pyzotero/
from pyzotero import zotero
import sys
# Python's built-in CSV support is pretty nice
View gist:7014243
class MyActivity extends Activity {
private Thread myWorker = new Thread() {
public void run() {
URL url = new URL("http://reddit.com/story");
url.openConnection();
String body = url.getBody();
myView.post(new Runnable() { public void run() {myView.setText(body)} });
}
}
View Core Library Project
buildscript {
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.6+'
}
}
View gist:5202247
{
"id" : "user/08031520133324451689/state/com.google/starred",
"title" : "Avram's starred items in Google Reader",
"author" : "Avram",
"updated" : 1274539669,
"direction" : "ltr",
"items" : [ {
"isReadStateLocked" : true,
"crawlTimeMsec" : "1274539669172",
"timestampUsec" : "1274539669172997",
View keybase.md

Keybase proof

I hereby claim:

  • I am avram on github.
  • I am ajlyon (https://keybase.io/ajlyon) on keybase.
  • I have a public key whose fingerprint is 5F32 D929 ED3A 9184 F0DA EDEB 1017 F829 DC6D A724

To claim this, I am signing this object:

@avram
avram / gist:3299514
Created Aug 8, 2012 — forked from anonymous/gist:2523336
Changing author info
View gist:3299514
#!/bin/sh
git filter-branch --env-filter '
an="$GIT_AUTHOR_NAME"
am="$GIT_AUTHOR_EMAIL"
cn="$GIT_COMMITTER_NAME"
cm="$GIT_COMMITTER_EMAIL"
if [ "$GIT_COMMITTER_EMAIL" = "your@email.to.match" ]
@avram
avram / gist:3299518
Created Aug 8, 2012 — forked from anonymous/gist:2523336
Changing author info
View gist:3299518
#!/bin/sh
git filter-branch --env-filter '
an="$GIT_AUTHOR_NAME"
am="$GIT_AUTHOR_EMAIL"
cn="$GIT_COMMITTER_NAME"
cm="$GIT_COMMITTER_EMAIL"
if [ "$GIT_COMMITTER_EMAIL" = "your@email.to.match" ]
View RIS.js
{
"translatorID": "32d59d2d-b65a-4da4-b0a3-bdd3cfb979e7",
"label": "RIS",
"creator": "Simon Kornblith",
"target": "ris",
"minVersion": "2.1.3",
"maxVersion": "",
"priority": 100,
"displayOptions": {
"exportCharset": "UTF-8",
@avram
avram / gist:1240306
Created Sep 25, 2011
stacktrace - db hygiene
View gist:1240306
E/com.gimranov.zandy.client.task.ZoteroAPITask(16691): java.lang.RuntimeException: java.lang.IllegalStateException: attempt to re-open an already-closed object: android.database.sqlite.SQLiteDatabase (database = /data/data/com.gimranov.zandy.client/databases/Zotero)
E/com.gimranov.zandy.client.task.ZoteroAPITask(16691): at com.gimranov.zandy.client.XMLResponseParser.parse(XMLResponseParser.java:262)
E/com.gimranov.zandy.client.task.ZoteroAPITask(16691): at com.gimranov.zandy.client.task.ZoteroAPITask.issue(ZoteroAPITask.java:377)
E/com.gimranov.zandy.client.task.ZoteroAPITask(16691): at com.gimranov.zandy.client.task.ZoteroAPITask.doFetch(ZoteroAPITask.java:121)
E/com.gimranov.zandy.client.task.ZoteroAPITask(16691): at com.gimranov.zandy.client.task.ZoteroAPITask.doInBackground(ZoteroAPITask.java:98)
E/com.gimranov.zandy.client.task.ZoteroAPITask(16691): at com.gimranov.zandy.client.task.ZoteroAPITask.doInBackground(ZoteroAPITask.java:1)
E/com.gimranov.zandy.client.task.ZoteroAPITask(16691): at android
@avram
avram / gist:1167767
Created Aug 24, 2011
Not duplicates!
View gist:1167767
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:res="http://purl.org/vocab/resourcelist/schema#"
xmlns:z="http://www.zotero.org/namespaces/export#"
xmlns:dcterms="http://purl.org/dc/terms/"
xmlns:bibo="http://purl.org/ontology/bibo/"
xmlns:address="http://schemas.talis.com/2005/address/schema#"
xmlns:foaf="http://xmlns.com/foaf/0.1/">
<z:UserItem rdf:about="http://zotero.org/users/5770/items/VKQT2UE2">
<res:resource rdf:resource="http://www.tatar-inform.ru/news/tatarstan/2011/02/17/258131/"/>
You can’t perform that action at this time.