Skip to content

Instantly share code, notes, and snippets.

View Manifest.json
"name": "Sizerator",
"version": "1.0",
"description": "The first extension that I made.",
"toolstrips": [
"permissions": [
View gist:193630
// Replace inline Images with Links
if (settings.replaceImagesWithLinks == 'true') {
jQuery('.postbody img').each(function() {
var source = jQuery(this).attr('src');
jQuery(this).after("<a href='" + source + "'>" + source + "</a>");
View gist:193659
// Replace Links with Images
if (settings.replaceLinksWithImages == 'true') {
var subset = jQuery('.postbody a');
if(settings.dontReplaceLinksSpoiler == 'true') {
subset = subset.not('.bbc-spoiler a');
subset.each(function() {
View gist:210395
import urllib
import urllib2
import re
from urllib2 import URLError, HTTPError
error = None
wave = None
auth = None
package com.bestpnd.MagneticFieldMeter;
import android.os.Bundle;
import android.hardware.*;
import android.widget.TextView;
import java.lang.Float;
public class MagFieldMonitor extends Activity
from direct.showbase.ShowBase import ShowBase
class MyApp(ShowBase):
def __init__(self):
environ = loader.loadModel("models/crash/crash_crude")
environ.setScale(0.25, 0.25, 0.25)
View gstatus error
W/System.err(17841): java.lang.Exception: java.lang.Exception
W/System.err(17841): at
W/System.err(17841): at
W/System.err(17841): at
W/System.err(17841): at
W/System.err(17841): at$3500(
W/System.err(17841): at$H.handleMessage(
W/System.err(17841): at android.os.Handler.dispatchMessage(
W/System.err(17841): at android.os.Looper.loop(
W/System.err(17841): at
View layout.xml
<?xml version="1.0" encoding="utf-8"?>

Reactive Forms with RxAndroid and TextInputLayout

Reactive Programming has been getting a lot of attention in the Android community lately. While it has uses throughout the application stack, we're going to focus here on using it to validate forms (exciting!). This approach cuts down on ugly nested if statements and transforms all of the validation logic to just a few simple lines using the RxJava framework. More, its robust and testable.

This post assumes some knowledge of how RxJava and lambdas work. If you need more of a refresher RxJava Retrolambda

Setup layout with TextInputLayout

View stacktrace iphone4
10-11 19:15:48.649: INFO/ActivityManager(17687): Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.wmbest.iphone4/.iPhone4Launcher }
10-11 19:15:48.707: INFO/ActivityManager(17687): Start proc com.wmbest.iphone4 for activity com.wmbest.iphone4/.iPhone4Launcher: pid=23166 uid=10113 gids={3003}
10-11 19:15:48.949: ERROR/dalvikvm(23166): Could not find class 'com.wmbest.iphone4.iPhone4Launcher$1', referenced from method com.wmbest.iphone4.iPhone4Launcher.onCreate
10-11 19:15:48.949: WARN/dalvikvm(23166): VFY: unable to resolve new-instance 155 (Lcom/wmbest/iphone4/iPhone4Launcher$1;) in Lcom/wmbest/iphone4/iPhone4Launcher;
10-11 19:15:48.949: DEBUG/dalvikvm(23166): VFY: replacing opcode 0x22 at 0x0026
10-11 19:15:48.949: DEBUG/dalvikvm(23166): VFY: dead code 0x0028-0036 in Lcom/wmbest/iphone4/iPhone4Launcher;.onCreate (Landroid/os/Bundle;)V
10-11 19:15:49.027: DEBUG/AndroidRuntime(23166): Shutting down VM
10-11 19:15:49.027: WARN/dalvikvm(231