Skip to content

Instantly share code, notes, and snippets.

View kabirnayeem99's full-sized avatar
🌦️

Naimul Kabir kabirnayeem99

🌦️
View GitHub Profile
@ImaginativeShohag
ImaginativeShohag / android_libraries_and_tools.md
Last active March 1, 2022 08:22
Android Libraries & Tools
@Beneboe
Beneboe / how-to-setup-verified-commits.md
Last active July 18, 2025 09:03
How to Setup Verified Commits on Github
@wajahatkarim3
wajahatkarim3 / KIntent.kt
Created February 27, 2018 20:43 — forked from passsy/KIntent.kt
Kotlin extension functions to start a generic Activity
package com.pascalwelsch.extensions
import android.app.Activity
import android.content.Context
import android.content.Intent
import android.os.Build
import android.os.Bundle
/**
* Extensions for simpler launching of Activities
@rharter
rharter / SharedPreferenceLiveData.kt
Last active March 19, 2023 08:15
Creates LiveData objects that observe a value in SharedPreferences while they have active listeners.
import android.arch.lifecycle.LiveData
import android.content.SharedPreferences
abstract class SharedPreferenceLiveData<T>(val sharedPrefs: SharedPreferences,
val key: String,
val defValue: T) : LiveData<T>() {
private val preferenceChangeListener = SharedPreferences.OnSharedPreferenceChangeListener { sharedPreferences, key ->
if (key == this.key) {
value = getValueFromPreferences(key, defValue)
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active July 26, 2025 19:20
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@harish-r
harish-r / Linked List.cpp
Created September 6, 2014 07:18
Linked List Implementation in C++
// Linked List CPP
#include<iostream>
using namespace std;
class Node
{
public:
int data;
Node *next;
@jewelzqiu
jewelzqiu / CropBitmapToCircle.java
Last active December 13, 2023 01:43
Crop a bitmap to circle in Android
public static Bitmap getCircledBitmap(Bitmap bitmap) {
Bitmap output = Bitmap.createBitmap(bitmap.getWidth(), bitmap.getHeight(), Bitmap.Config.ARGB_8888);
Canvas canvas = new Canvas(output);
final Paint paint = new Paint();
final Rect rect = new Rect(0, 0, bitmap.getWidth(), bitmap.getHeight());
paint.setAntiAlias(true);
canvas.drawARGB(0, 0, 0, 0);
canvas.drawCircle(bitmap.getWidth() / 2, bitmap.getHeight() / 2, bitmap.getWidth() / 2, paint);
paint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.SRC_IN));
@keicoder
keicoder / Locations.m
Created March 2, 2014 06:32
objective-c : getting locaton
//getting locaton
//1. MyLocations Project Settings
//use tab bar controller
//import CoreLocation.framework
//CurrentLocationViewController.h
#import <CoreLocation/CoreLocation.h>
@joshdholtz
joshdholtz / SomeFragment.java
Last active December 22, 2022 09:41
Android Google Maps V2 - MapView in XML
public class SomeFragment extends Fragment {
MapView mapView;
GoogleMap map;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View v = inflater.inflate(R.layout.some_layout, container, false);