Skip to content

Instantly share code, notes, and snippets.

View wajahatkarim3's full-sized avatar
:octocat:
Subscribe to my newsletter: remotekaro.substack.com

Wajahat Karim wajahatkarim3

:octocat:
Subscribe to my newsletter: remotekaro.substack.com
View GitHub Profile
@ArthurNagy
ArthurNagy / RoundedBottomSheetDialogFragment.kt
Last active March 19, 2023 08:14
Rounded modal bottom sheet as seen in new Google products(Tasks, News, etc.), described in this article: https://medium.com/halcyon-mobile/implementing-googles-refreshed-modal-bottom-sheet-4e76cb5de65b
package com.your.package
import android.app.Dialog
import android.os.Bundle
import com.your.package.R
import com.google.android.material.bottomsheet.BottomSheetDialog
import com.google.android.material.bottomsheet.BottomSheetDialogFragment
/**
* BottomSheetDialog fragment that uses a custom
@florina-muntenescu
florina-muntenescu / BaseDao.kt
Last active September 28, 2023 15:01
Use Dao inheritance to reduce the amount of boilerplate code - https://medium.com/google-developers/7-pro-tips-for-room-fbadea4bfbd1
/*
* Copyright (C) 2017 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@zymr-keshav
zymr-keshav / Ubuntu to macOS.md
Created September 15, 2017 04:27
useful tweaks and tip while switching from ubuntu to macOS x

MacOS Sierra 10.12.5 Macbook Pro ( Ratina )

Ubuntu to Mac os.

  1. You can not create new file from context menu but can create new folder only. alternative: use touch filename
  2. No utility to lock the monitor alternative: a. Navigate to  icon --> System Prefrences --> Security & Privacy --> General --> Check Require Password immediately after sleep or screen saver starts b. hit Shift-Control-Power hold them down for two seconds, revoke by Spacebar
  3. No way to see hidden files in a folder.
@sheerazam
sheerazam / ArcUtils.java
Created October 6, 2016 11:22
Fresco Circular Progress Drawable
public final class ArcUtils {
private static final double FULL_CIRCLE_RADIANS = toRadians(360d);
private ArcUtils() { }
/**
* Draws a circular arc on the given {@code Canvas}.
*
* @param canvas The canvas to draw into.
* @param circleCenter The center of the circle on which to draw the arc.
package com.firebase.utils;
import java.util.Date;
/**
* Fancy ID generator that creates 20-character string identifiers with the
* following properties:
*
* 1. They're based on timestamp so that they sort *after* any existing ids.
* 2. They contain 72-bits of random data after the timestamp so that IDs won't
public Bitmap ConvertToSepia(Bitmap sampleBitmap){
float[] sepMat = {
0.3930000066757202f,
0.7689999938011169f,
0.1889999955892563f,
0,
0,
0.3490000069141388f,
0.6859999895095825f,
0.1679999977350235f,
@rxaviers
rxaviers / gist:7360908
Last active April 25, 2024 04:56
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue: