Skip to content

Instantly share code, notes, and snippets.

View Qamar4P's full-sized avatar
🤠
The master of basics

Qamar Abbas Qamar4P

🤠
The master of basics
View GitHub Profile
@Qamar4P
Qamar4P / Remove all git tags
Created August 8, 2019 06:03 — forked from okunishinishi/Remove all git tags
Delete all git remote tags
#Delete local tags.
git tag -l | xargs git tag -d
#Fetch remote tags.
git fetch
#Delete remote tags.
git tag -l | xargs -n 1 git push --delete origin
#Delete local tasg.
git tag -l | xargs git tag -d
@Qamar4P
Qamar4P / Remove all git tags
Created August 8, 2019 06:03 — forked from okunishinishi/Remove all git tags
Delete all git remote tags
#Delete local tags.
git tag -l | xargs git tag -d
#Fetch remote tags.
git fetch
#Delete remote tags.
git tag -l | xargs -n 1 git push --delete origin
#Delete local tasg.
git tag -l | xargs git tag -d
package com.irisvision.controllers;
import android.view.KeyEvent;
import android.view.MotionEvent;
public interface ExternalEventListener {
public boolean onControllerKeyEvent(KeyEvent event);
public boolean onControllerTouchEvent(MotionEvent event);
}
package com.irisvision.controllers;
import android.view.KeyEvent;
import android.view.MotionEvent;
public interface ExternalEventListener {
public boolean onControllerKeyEvent(KeyEvent event);
public boolean onControllerTouchEvent(MotionEvent event);
}
@Qamar4P
Qamar4P / gradlew
Last active April 24, 2019 10:50
CircleCI configuration gradlew file for buidling Android project in docker
#!/usr/bin/env bash
##############################################################################
##
## Gradle start up script for UN*X
##
##############################################################################
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
@Qamar4P
Qamar4P / config.yml
Last active April 24, 2019 10:25
CircleCI configuration file for Android Studio builds that works
version: 2
jobs:
build:
working_directory: ~/code
docker:
- image: circleci/android:api-26
environment:
JVM_OPTS: -Xmx3200m
steps:
- checkout
@Qamar4P
Qamar4P / PermissionHelper.java
Created April 11, 2018 04:50
Run-time permission helper. Dangerous permissions https://stackoverflow.com/a/36937109/5710872
package com.qamar.kust.ui.helpers;
import android.app.Activity;
import android.content.Context;
import android.content.pm.PackageManager;
import android.support.v4.app.ActivityCompat;
import android.support.v4.content.ContextCompat;
import android.support.v4.content.PermissionChecker;
/**
@Qamar4P
Qamar4P / SpinnerViewHelper.java
Created October 18, 2017 12:09
This class is used to change spinner view properties (text color, font, size etc) easily without setting adapter programmatically.
package com.locopixel.agri.ui.helper;
import android.database.DataSetObserver;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.Spinner;
import android.widget.SpinnerAdapter;
/**
@Qamar4P
Qamar4P / ZoomBouncingAnimation.java
Last active July 5, 2017 07:26
Zoom and bounce twice any number of views in Android
package com.qamar4p.animationexample;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.AnimatorSet;
import android.animation.ObjectAnimator;
import android.view.View;
import java.util.ArrayList;
import java.util.List;