Skip to content

Instantly share code, notes, and snippets.

View kumar935's full-sized avatar
🎯
{}

Kumar Animesh kumar935

🎯
{}
  • Thoughtspot
  • India
View GitHub Profile
@martinheld
martinheld / GraphQL introspection query via curl.md
Last active August 15, 2025 00:10
GraphQL introspection query via curl

GraphQL introspection query via curl

cat introspection_query.json

{ 
  "query": "query IntrospectionQuery {
      __schema {
        queryType { name }
        mutationType { name }
@kumar935
kumar935 / SwipeButton.java
Last active May 24, 2017 04:53
Swipe Button for android
import android.content.Context;
import android.graphics.LinearGradient;
import android.graphics.Shader;
import android.graphics.drawable.ShapeDrawable;
import android.graphics.drawable.shapes.RectShape;
import android.util.AttributeSet;
import android.util.Log;
import android.view.MotionEvent;
import android.widget.Button;
@pstoica
pstoica / OnBlurComponent.jsx
Last active September 9, 2024 05:14
onBlur for entire react element
function OnBlurComponent({ onBlur }) {
const handleBlur = (e) => {
const currentTarget = e.currentTarget;
// Check the newly focused element in the next tick of the event loop
setTimeout(() => {
// Check if the new activeElement is a child of the original container
if (!currentTarget.contains(document.activeElement)) {
// You can invoke a callback or add custom logic here
onBlur();