Skip to content

Instantly share code, notes, and snippets.

@akshat12
akshat12 / gist:9885832
Created March 31, 2014 05:26
Facebook OAuth Fail Stack Trace
128.189.251.194 - akshatdivekar [30/Mar/2014:22:24:52 -0700] "POST /bcboozesearch/facebook HTTP/1.1" 500 83 "http://1-dot-secret-epsilon-515.appspot.com/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.152 Safari/537.36" "1-dot-secret-epsilon-515.appspot.com" ms=18 cpu_ms=27 cpm_usd=0.000009 app_engine_release=1.9.1 instance=00c61b117c4ba5f7ab30569af4b757f5cbac75
E 2014-03-30 22:24:52.080
javax.servlet.ServletContext log: Exception while dispatching incoming RPC call
com.google.gwt.user.server.rpc.UnexpectedException: Service method 'public abstract void com.google.gwt.bcboozesearch.client.FacebookConnectService.createPost(java.lang.String,java.lang.String)' threw an unexpected exception: java.lang.NullPointerException
at com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure(RPC.java:389)
at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:579)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceSe
source 'https://rubygems.org'
# Tell Heroku and bundler which Ruby to use
ruby '2.3.1'
# These gems cannot be lazy-loaded easily.
gem 'rake', '~> 12'
gem 'haml-rails', '~> 0.4' # Used for nearly all views #newer version require Rails 4.0+
gem 'auto_strip_attributes', '~> 2.1' # Strip attributes before saving in DB
gem 'settingslogic', '~> 2.0.9' # For app-wide settings
GIT
remote: git://github.com/activeadmin/activeadmin.git
revision: 3dce5b3c7fda51fb6507159f33bf644682dfee7e
specs:
activeadmin (1.0.0.pre4)
arbre (~> 1.0, >= 1.0.2)
bourbon
coffee-rails
formtastic (~> 3.1)
formtastic_i18n
{
"date_str": "December 21, 2021"
}
{
"date_str": "April 30, 2025 12:00 PM"
}
@Composable
fun ConditionalColumnLayoutWithThreshold() {
BoxWithConstraints(modifier = Modifier.fillMaxSize()) {
// This '200.dp' is brittle and doesn't adapt to content changes!
if (maxHeight > 200.dp) {
Column {
Text("Top Element", Modifier.background(Color.Yellow).height(100.dp))
Text("Middle Element", Modifier.background(Color.Green).height(50.dp))
Text("Bottom Element", Modifier.background(Color.Blue).height(50.dp))
}
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.layout.Layout
import androidx.compose.ui.layout.Placeable
import androidx.compose.ui.unit.Constraints
import androidx.compose.ui.layout.Measurable
@Composable
fun GenericConditionalLayout(
modifier: Modifier = Modifier,
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.padding
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.unit.dp
@Composable
@akshat12
akshat12 / MyAccessibilityService.kt
Created September 19, 2025 02:49
MyAccessibilityService.kt defines a basic implementation of an accessibility service
// MyAccessibilityService.kt
import android.accessibilityservice.AccessibilityService
import android.view.accessibility.AccessibilityEvent
import android.util.Log
class MyAccessibilityService : AccessibilityService() {
private val TAG = "MyAccessibilityService"
override fun onAccessibilityEvent(event: AccessibilityEvent?) {
@akshat12
akshat12 / accessibility_service_config.xml
Last active September 19, 2025 02:52
Service config for sample accessibility service: res/xml/accessibility_service_config.xml
<accessibility-service xmlns:android="http://schemas.android.com/apk/res/android"
android:description="@string/accessibility_service_description"
android:accessibilityEventTypes="typeWindowStateChanged"
android:packageNames="com.google.android.youtube, com.google.android.gm"
android:accessibilityFeedbackType="feedbackGeneric"
android:notificationTimeout="100"
android:canRetrieveWindowContent="true" />