Skip to content

Instantly share code, notes, and snippets.

View pfieffer's full-sized avatar
🦉
Working :/

Ravi Garbuja Pun pfieffer

🦉
Working :/
View GitHub Profile
@GokhanArik
GokhanArik / NetworkStateManager.kt
Created March 12, 2020 03:11
Check Internet Connection in Android 21+
package manager
import android.content.Context
import android.net.ConnectivityManager
import android.net.Network
import android.net.NetworkCapabilities
import android.net.NetworkRequest
import android.os.Build
import android.util.Log
import com.jakewharton.rxrelay2.BehaviorRelay
@IlyaEremin
IlyaEremin / app_version.gradle
Last active August 2, 2023 15:59
Npm version for gradle
def getVersionName = { getVersionProps()['appVersionName'] }
def getVersionProps() {
def versionPropsFile = file('gradle.properties')
if (!versionPropsFile.exists()) {
versionPropsFile.createNewFile()
}
def versionProps = new Properties()
versionProps.load(new FileInputStream(versionPropsFile))
return versionProps
@cham11ng
cham11ng / taiga.md
Created February 9, 2017 10:52
Taiga Integration

Taiga Integration

First: Configure the integration module in Taiga

  1. Go to Admin > Integrations > GitHub or Bitbucket
  2. Fill secret key or use the auto generated one
  3. Copy the payload URL input

Second: Configure Webhooks in your GitHub repository

  1. Click on Settings > Webhooks & Services > Add webhook
  2. On that screen set the payload url with the payload url from Taiga
@cham11ng
cham11ng / git-ssh-configuration.md
Last active July 13, 2024 19:04
Configuring SSH for Git

Git Installation and SSH Configuration

By: Sagar Chamling

Installation

For Linux (Debian/Ubuntu):

sudo apt install git
@ricalo
ricalo / .bashrc
Last active April 30, 2024 15:15
Use git-bash from Android Studio terminal
if [ ! -z "${IDE}" -a "${IDE}" == "AndroidStudio" ]; then
cd $OLDPWD;
fi
@aeroechelon
aeroechelon / material_design_guidelines_dimens.xml
Last active October 6, 2022 04:06
Recommended Material Design Dimensions for Android
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!--
# Material Design Dimensions
These common dimensions for spacing and typepography that
are provided as per Material Design Guidelines.
-->
<!-- Margin & Padding, 8 dp baseline, https://material.io/design/layout/understanding-layout.html -->
@irfanfadilah
irfanfadilah / Ubuntu Alias Command
Last active January 14, 2018 08:32
Create Alias Command in Ubuntu
1. Create a file called .bash_aliases using your favorite text editor.
gedit .bash_aliases
2. Write the alias you want to create, e.g:
alias update='sudo apt-get update'
3. Save the file and reconfigure your bashrc.
. ~/.bashrc
4. Check if your alias is added correctly.
@vgonda
vgonda / MainActivityTest.java
Created June 11, 2015 13:51
Example of how to use espresso-intents in Android tests
package com.collectiveidea.example;
import android.content.Intent;
import android.support.test.espresso.intent.Intents;
import android.support.test.rule.ActivityTestRule;
import android.support.test.runner.AndroidJUnit4;
import com.collectiveidea.example.ui.LoginActivity;
import com.collectiveidea.example.ui.MainActivity;
import com.collectiveidea.example.util.AccountUtility;
@gelldur
gelldur / ShareIntentBuilder
Last active January 24, 2022 11:12
Share builder for android
package com.dexode.util;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.pm.LabeledIntent;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.net.Uri;
import android.support.annotation.Nullable;
@rfreedman
rfreedman / DebouncedOnClickListener.java
Created May 14, 2013 03:09
A debounced onClickListener for Android
import android.os.SystemClock;
import android.view.View;
import java.util.Map;
import java.util.WeakHashMap;
/**
* A Debounced OnClickListener
* Rejects clicks that are too close together in time.
* This class is safe to use as an OnClickListener for multiple views, and will debounce each one separately.