Skip to content

Instantly share code, notes, and snippets.

View kanakamedala-rajesh's full-sized avatar
🎧
Focusing

Rajesh Kanakamedala kanakamedala-rajesh

🎧
Focusing
View GitHub Profile

ELF Format Cheatsheet

Introduction

Executable and Linkable Format (ELF), is the default binary format on Linux-based systems.

ELF

Compilation

@kanakamedala-rajesh
kanakamedala-rajesh / IMMLeaks.java
Created July 17, 2019 01:30 — forked from pyricau/IMMLeaks.java
"Fix" for InputMethodManager leaking the last focused view: https://code.google.com/p/android/issues/detail?id=171190
import android.app.Activity;
import android.app.Application;
import android.content.Context;
import android.content.ContextWrapper;
import android.os.Bundle;
import android.os.Looper;
import android.os.MessageQueue;
import android.util.Log;
import android.view.View;
import android.view.ViewTreeObserver;
@kanakamedala-rajesh
kanakamedala-rajesh / SimpleTimerThreshold.java
Created May 30, 2017 17:56 — forked from rsaunders100/SimpleTimerThreshold.java
(Android) Use to check check if a threshold has expired since a last event. e.g. 5 mins has expired since the lat time some data has been downloaded. Optional persistant storage.
package uk.co.digitaljigsaw.utils;
import java.util.Calendar;
import java.util.Date;
import android.R.string;
import android.content.Context;
import android.content.SharedPreferences;
public void transformPage(View view, float position) {
int pageWidth = view.getWidth();
if (position < -1) { // [-Infinity,-1)
// This page is way off-screen to the left.
view.setAlpha(0);
} else if (position <= 1) { // [-1,1]