This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.cafesalam.experiments.app.ui; | |
import org.lucasr.probe.Interceptor; | |
import android.content.Context; | |
import android.graphics.Color; | |
import android.graphics.Point; | |
import android.view.View; | |
import android.view.ViewGroup; | |
import android.view.ViewParent; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.cafesalam.experiments.app.ui; | |
import org.lucasr.probe.Interceptor; | |
import android.content.Context; | |
import android.view.View; | |
import android.view.ViewGroup; | |
import java.util.WeakHashMap; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CmdUtils.CreateCommand({ | |
name: "search-quran", | |
homepage: "http://whatstheplot.com", | |
icon: "http://alpha.quranicrealm.com/images/favicon.ico", | |
takes: {"query": noun_arb_text}, | |
preview: function( pblock, query ) { | |
if (query.text.length < 1){ | |
pblock.innerHTML = "will search the quran for the specified text"; | |
return; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CmdUtils.CreateCommand({ | |
names: ["search quran", "search-quran"], | |
homepage: "http://whatstheplot.com", | |
icon: "http://alpha.quranicrealm.com/images/favicon.ico", | |
arguments: [ {role: 'object', nountype: noun_arb_text, label: 'query'} ], | |
preview: function( pblock, args ) { | |
if (args.object.text.length < 1){ | |
pblock.innerHTML = "will search the quran for the specified text"; | |
return; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* quran jetpack script | |
* -------------------- | |
* a jetpack script which introduces a context menu that allows replacing | |
* instances of sura:ayah in textareas with the actual ayah text from the | |
* quran. tested under jetpack 0.6.2. | |
* | |
* http://whatstheplot.com/blog/2009/11/16/quran-jetpack-script/ | |
*/ | |
jetpack.future.import("menu"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class SimpleView extends View { | |
final Paint paint = new Paint(); | |
public SimpleView(Context context) { | |
this(context, null); | |
} | |
public SimpleView(Context context, AttributeSet attrs) { | |
this(context, attrs, R.attr.SimpleViewStyle); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
# a shell script to make it easier to download images from google's | |
# material design icons project. | |
# | |
# usage: | |
# sh ~/material.sh -f ic_pause.png https://github.com/google/material-design-icons/blob/master/av/drawable-xxhdpi/ic_pause_white_24dp.png | |
# by default, it outputs to app/src/main/res/drawable-* in the current | |
# directory, but you can override with -o. | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// backward-compatible means of tinting a progress bar | |
public void tintProgressDrawable(SeekBar seekBar, int tintColor) { | |
final Drawable progressDrawable = seekBar.getProgressDrawable(); | |
if (progressDrawable != null) { | |
if (progressDrawable instanceof LayerDrawable) { | |
LayerDrawable ld = (LayerDrawable) progressDrawable; | |
int layers = ld.getNumberOfLayers(); | |
for (int i = 0; i < layers; i++) { | |
ld.getDrawable(i).mutate().setColorFilter(tintColor, PorterDuff.Mode.SRC_ATOP); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.quran.labs.androidquran.model.bookmark; | |
import org.junit.Test; | |
import io.reactivex.Single; | |
import io.reactivex.observers.TestObserver; | |
import io.reactivex.schedulers.Schedulers; | |
public class ContrivedTest { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import csv | |
import requests | |
import sys | |
""" | |
This script converts a Goodreads export csv into a Book Track friendly csv. | |
It does this by querying Google Books' api for each book and adding its id, | |
along with removing some of the other unnecessary fields in the original | |
export. |
OlderNewer