Skip to content

Instantly share code, notes, and snippets.

View AfzalivE's full-sized avatar
🌴
On vacation

Afzal Najam AfzalivE

🌴
On vacation
View GitHub Profile
@AfzalivE
AfzalivE / userChrome.css
Created September 6, 2023 13:38 — forked from lucaspar/userChrome.css
Stylesheets for collapsible vertical tabs for Firefox. Tabs expand horizontally when hovered, similar to Edge's.
/*
How to use this CSS:
0. Install the Sidebery extension: https://addons.mozilla.org/en-US/firefox/addon/sidebery/.
1. In Sidebery settings:
a. Set the title preface must as "[S] " (without quotes).
This is used by CSS rules below to identify when Sidebery is active.
b. Set 'Tabs tree structure' to false -- this stylesheet doesn't adapt to
multiple tab levels, but feel free to tweak it!
c. Copy and paste the "SIDEBERY STYLES" section below as a custom
class ForegroundServiceLauncher(private val serviceClass: Class<out Service>) {
private var isStarting = false
private var shouldStop = false
private var isCreated = false
@Synchronized
fun startService(context: Context, block: Intent.() -> Unit = {}) {
if (!isCreated) {
isStarting = true
@AfzalivE
AfzalivE / debug_from_qr.py
Created October 29, 2020 23:02 — forked from benigumocom/debug_from_qr.py
Connect Wireless Debug from Terminal on Android11
#!/usr/bin/env python3
"""
Android11
Pair and connect devices for wireless debug on terminal
python-zeroconf: A pure python implementation of multicast DNS service discovery
https://github.com/jstasiak/python-zeroconf
"""
@AfzalivE
AfzalivE / quotes.json
Last active February 20, 2023 19:59 — forked from signed0/quotes.json
json formatted quotes
[
{
"quote": "Life isn’t about getting and having, it’s about giving and being.",
"author": "Kevin Kruse"
},
{
"quote": "Whatever the mind of man can conceive and believe, it can achieve.",
"author": "Napoleon Hill"
},
{
@AfzalivE
AfzalivE / Android CI
Created December 1, 2016 00:22 — forked from JvmName/Android CI
Android CI
#Android and CI and Gradle (A How-To)
There are tech stacks in this world that make it dead simple to integrate a <abbr title="Continuous Integration">CI</abbr> build system. <br>
The Android platform is not one of them.
Although Gradle is getting better, it's still a bit non-deterministic, and some of the fixes you'll need will start to feel more like black magic than any sort of programming.
But fear not! It can be done!
Before we embark on our journey, you'll need a few things to run locally:
@AfzalivE
AfzalivE / idea
Last active January 15, 2020 09:38 — forked from chrisdarroch/idea
Open/Import a gradle or idea project in Android Studio from your command line!
#!/bin/sh
# check for where the latest version of IDEA is installed
IDEA=`ls -1d /Applications/Android\ Studio.app | tail -n1`
wd=`pwd`
# were we given a directory?
if [ -d "$1" ]; then
# echo "checking for things in the working dir given"
wd=`ls -1d "$1" | head -n1`
/**
* A module for dependencies which require a {@link android.content.Context} or
* {@link android.app.Application} to create.
*/
@Module(
library = true
)
public class ContextModule {
private Context appContext;
@AfzalivE
AfzalivE / gist:eea5918ac0c61eb08343
Last active August 29, 2015 14:24 — forked from ljubisa987/gist:e33cd5597da07172c55d
TextInputLayout with fixed "hints not showing"
package com.centralway.numbrs.numbrsapp.views;
import android.content.Context;
import android.graphics.Canvas;
import android.support.design.widget.TextInputLayout;
import android.support.v4.view.ViewCompat;
import android.util.AttributeSet;
import android.view.View;
import android.view.ViewGroup;
import android.widget.EditText;
@AfzalivE
AfzalivE / 0_reuse_code.js
Last active August 29, 2015 14:22
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@AfzalivE
AfzalivE / gist:e26d4b10efdd7239031e
Created May 23, 2014 04:51 — forked from anonymous/gist:11010752
Inspiration for openGL stuff
URL: http://beesandbombs.tumblr.com/page/6
void setup(){
size(500,500,P3D);
smooth(8);
}
float f(int i, int j, float q){
return(q*(noise(.2*(i+400-.05*frameCount),.2*(j+90))-.5));
}