Skip to content

Instantly share code, notes, and snippets.

View aliumujib's full-sized avatar

Abdul-Mujeeb Aliu aliumujib

  • Nigeria, Lagos
View GitHub Profile
@nmwsharp
nmwsharp / printarr
Last active October 24, 2023 08:06
Pretty print tables summarizing properties of tensor arrays in numpy, pytorch, jax, etc. --- now on pip: `pip install arrgh`
Pretty print tables summarizing properties of tensor arrays in numpy, pytorch, jax, etc.
Now on pip! `pip install arrgh` https://github.com/nmwsharp/arrgh
@emmaguy
emmaguy / AndroidManifest.xml
Created February 1, 2020 14:01
Click the 'Skip Intro' button on the Android notification from the Netflix app
<service
android:name=".NotificationService"
android:label="@string/notification_service_name"
android:permission="android.permission.BIND_NOTIFICATION_LISTENER_SERVICE">
<intent-filter>
<action android:name="android.service.notification.NotificationListenerService" />
</intent-filter>
</service>
@bdivljak91
bdivljak91 / BluetoothStateBroadcastReceiver.txt
Last active April 23, 2021 05:43
Bluetooth state broadcast receiver - Clean Architecture
import android.bluetooth.BluetoothAdapter
import android.content.BroadcastReceiver
import android.content.Intent
import android.content.Context
import dagger.android.AndroidInjection
import io.reactivex.Observable
import io.reactivex.subjects.BehaviorSubject
import javax.inject.Inject
@marnanel
marnanel / gist:87fee222990df53d23a9999d90a4eae2
Created June 27, 2018 18:39
Sub Station Alpha (libass) subtitle format spec
Sub Station Alpha v4.00+ Script Format
1. 1. General information
2. 2. The [sections] of a Sub Station Alpha script
3. 3. The line types in a Sub Station Alpha script
4. 4. Header lines, [Script Info] section
5. 5. Style lines, [v4 Styles] section
6. 6. Dialogue event lines, [Events] section
@BenoitDuffez
BenoitDuffez / mig
Last active October 12, 2023 18:52
Parse migration failed exception (Android Room)
#!/bin/bash
# Clean up on exit
function finish {
rm -f expected found
}
trap finish EXIT
# How to parse JSON
JQ="jq --sort-keys"
@JosiasSena
JosiasSena / DeCryptor.java
Last active September 12, 2023 12:40
Encryptor and Decryptor for data encryption.decryption using the Android KeyStore.
/**
_____ _____ _
| __ \ / ____| | |
| | | | ___| | _ __ _ _ _ __ | |_ ___ _ __
| | | |/ _ \ | | '__| | | | '_ \| __/ _ \| '__|
| |__| | __/ |____| | | |_| | |_) | || (_) | |
|_____/ \___|\_____|_| \__, | .__/ \__\___/|_|
__/ | |
|___/|_|
*/
@chranderson
chranderson / nvmCommands.js
Last active April 25, 2024 07:16
Useful NVM commands
// check version
node -v || node --version
// list locally installed versions of node
nvm ls
// list remove available versions of node
nvm ls-remote
// install specific version of node
@cesarferreira
cesarferreira / RxJava.md
Last active February 2, 2022 07:28
Party tricks with RxJava, RxAndroid & Retrolambda

View Click

Instead of the verbose setOnClickListener:

RxView.clicks(submitButton).subscribe(o -> log("submit button clicked!"));

Filter even numbers

Observable
    .just(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
@ph0b
ph0b / build.gradle
Last active February 12, 2023 07:45
sample build.gradle for generating split APKs per ABI
apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion "21.1.2"
defaultConfig{
minSdkVersion 14
targetSdkVersion 21
versionCode 101
@archeg
archeg / gist:8333021
Created January 9, 2014 11:58
Example of code that uses HID for Android to connect to the device through USB.
package com.company.app.PlatformMethods;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.Queue;
import java.util.Set;
import android.app.PendingIntent;
import android.content.BroadcastReceiver;