Skip to content

Instantly share code, notes, and snippets.

View glm-mawla's full-sized avatar
🎯
Focusing

Md. Golam Mawla glm-mawla

🎯
Focusing
View GitHub Profile
@glm-mawla
glm-mawla / gist:0925512da605f5ba7a7d3f3f72412e94
Last active December 18, 2023 14:22
Android SDK : add to PATH variable change MAC
# Add RVM to PATH for scripting. Make sure this is the last PATH variable change.
export PATH="$PATH:$HOME/.rvm/bin"
export ANDROID_HOME=/Users/Newton/SDK
export PATH=$ANDROID_HOME/platform-tools:$PATH
export PATH="/Users/Newton/SDK_Flutter/bin":$PATH
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-18.jdk/Contents/Home
export PATH="/Library/Java/JavaVirtualMachines/jdk-18.jdk/Contents/Home":$PATH
@glm-mawla
glm-mawla / gist:00a287ffeb9119a39a8acc7bca34b9d8
Created October 3, 2023 17:39
Update to your path file for MAC
echo $SHELL
open ~/.bash_profile or open ~/.zshrc or open ~/.bashrc (if SHELL = /bin/zsh)
export PATH="DIRECTORY_PATH":$PATH
source ~/.bash_profile or ~/.zshrc or ~/.bashrc (if SHELL = /bin/zsh)
@glm-mawla
glm-mawla / gist:83d9e59f3a9d99a1bf919a2120c46a9c
Created January 19, 2021 06:40
setup ADB on mac for zsh user - term2
> echo 'export ANDROID_HOME=/Users/xyz/Documents/ANDROID_SDK ' >> ~/.zshrc
> echo 'export PATH=${PATH}:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools' >> ~/.zshrc
> source ~/.zshrc
>
@glm-mawla
glm-mawla / generate-ssh
Last active January 4, 2020 11:04
generate ssh : Mac OSX 10.15.2
Enter commang: ssh-keygen & press enter until generate fingerprint
then - enter command for copy to clipboard: pbcopy < ~/.ssh/id_rsa.pub
Result:
MacBook-Pro ~ % ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/Users/newton/.ssh/id_rsa):
Created directory '/Users/newton/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
For MAC user only.
install jfrog in Docker:
$ docker pull docker.bintray.io/jfrog/artifactory-oss:latest
run a new container:
$ docker run --name artifactory -d -p 8081:8081 docker.bintray.io/jfrog/artifactory-oss:latest
@glm-mawla
glm-mawla / LICENCE SUBLIME TEXT
Created January 12, 2019 18:39
Sublime Text 3 Serial key build is 3176
## Sublime Text 3 Serial key build is 3176
> * Added these lines into /etc/hosts
127.0.0.1 www.sublimetext.com
127.0.0.1 license.sublimehq.com
> * Used the license key
----- BEGIN LICENSE -----
"adb start-server" : start adb server
"adb kill-server" : stop adb server
"adb -P 5038 start-server" : start daemon in port 5038.
reff:
https://developer.android.com/training/app-indexing/deep-linking.html#adding-filters
https://developer.chrome.com/multidevice/android/intents#example
https://developers.helpshift.com/android/deep-linking/
Manifest syntax:
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
public class RatioViewPager extends ViewPager {
private float mRatio = 1f;
public RatioViewPager(Context context) {
super(context);
}
public RatioViewPager(Context context, AttributeSet attrs) {
super(context, attrs);
package com.example.mediaplayersurfaceswitch;
import android.app.Activity;
import android.content.Intent;
import android.media.MediaPlayer;
import android.net.Uri;
import android.os.Bundle;
import android.util.Log;
import android.view.SurfaceHolder;
import android.view.SurfaceView;