Skip to content

Instantly share code, notes, and snippets.

View loganj's full-sized avatar

Logan Johnson loganj

  • Square, Inc.
  • New York, NY
View GitHub Profile
/**
* Copyright (C) 2008 Logan Johnson
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
/**
* Copyright (C) 2008 Logan Johnson
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
/**
* Copyright (C) 2008 Logan Johnson
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
Red Curry Chicken
=================
Ingredients
-------------------------
- 1 lb chicken, cubed
- 1 can coconut milk
- 1 red bell pepper, sliced into thin strips
- 4 shallots
- 2 cloves garlic, minced
@loganj
loganj / JSE 6 API bookmarklet
Created April 2, 2009 13:35
Java 6 Lucky bookmarklet
same as http://pastie.org/434851 but with "I'm Feeling Lucky" so you skip the search results list.
javascript:void(q=prompt('Java%20class%20Name:',''));if(q)void(location.href='http://www.google.com/search?q='+escape(q)+'%20site%3Adownload.oracle.com%2Fjavase%2F6%2Fdocs'+'&btnI=745')
final public class DontDoThis {
static class SuperClass {
SuperClass() {
overridableMethod(); // this is a bad idea. wait, you'll see.
}
protected void overridableMethod() {
}
/**
* Base trait for all classes that wants to be able use the logging infrastructure.
*
* @author <a href="http://jonasboner.com">Jonas Bon&#233;r</a>
*/
trait Logging {
@transient var log = Logger.get(this.getClass.getName)
}
/**
package scamz
import org.apache.commons.codec.binary.Base64
import io.Source
import xml.{Node, XML}
import java.io.{FileOutputStream, File}
import scalax.io.{OutputStreamResource, InputStreamResource}
object Scamz extends AmazonCipherFactory {
class HasArray(var array: Array[String])
val hasArray = new HasArray(Array("d","e"))
case class HasList[T](list: List[T])
val hasList = HasList("a" :: "b" :: "c" :: Nil)
val field = hasArray.getClass.getDeclaredField("array")
field.setAccessible(true)
val unboxed = hasList.list.toArray.asInstanceOf[scala.runtime.BoxedAnyArray].unbox(field.getType.getComponentType)
field.set(hasArray, unboxed)
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..fe09c91
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,3 @@
+.hg
+main/res/values/credentials.xml
+main/src/com/joelapenna/foursquared/FoursquaredSettings.java
diff --git a/main/AndroidManifest.xml b/main/AndroidManifest.xml