Skip to content

Instantly share code, notes, and snippets.

View Sanaebadi97's full-sized avatar
☹️
A tired girl

Sana Ebadi Sanaebadi97

☹️
A tired girl
View GitHub Profile
@rxaviers
rxaviers / gist:7360908
Last active July 17, 2024 18:16
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:
@artem-zinnatullin
artem-zinnatullin / MyApp.java
Last active January 15, 2023 13:04
If you need to set one font for all TextViews in android application you can use this solution. It will override ALL TextView's typefaces, includes action bar and other standard components, but EditText's password font won't be overriden.
public class MyApp extends Application {
@Override
public void onCreate() {
TypefaceUtil.overrideFont(getApplicationContext(), "SERIF", "fonts/Roboto-Regular.ttf"); // font from assets: "assets/fonts/Roboto-Regular.ttf
}
}
@wojteklu
wojteklu / clean_code.md
Last active July 17, 2024 11:23
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@jemshit
jemshit / proguard-rules.pro
Last active June 13, 2024 07:25
Proguard Rules for Android libraries
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
-keepclassmembers class fqcn.of.javascript.interface.for.webview {
public *;
}
### RxJava, RxAndroid (https://gist.github.com/kosiara/487868792fbd3214f9c9)
-keep class rx.schedulers.Schedulers {
public static <methods>;

Interview Questions

Kotlin

Q1: What is a primary constructor in Kotlin? ☆☆

Answer: The primary constructor is part of the class header. Unlike Java, you don't need to declare a constructor in the body of the class. Here's an example:

@runo280
runo280 / job.txt
Last active August 26, 2020 05:39
https://t.me/asan_job_iran
https://t.me/doorijob
https://t.me/expertonline
https://t.me/favakar
https://t.me/favakargroupp
https://t.me/freelancer_job
https://t.me/group_estekhdam
https://t.me/hr_startup
https://t.me/itjobschannel
https://t.me/job_stuepa
package com.sanaebadi.foursquare.presentaion.util
import android.content.Context
import android.content.Context.CONNECTIVITY_SERVICE
import android.content.Intent
import android.content.pm.PackageManager
import android.net.ConnectivityManager
import android.net.Uri
import android.os.Build
import android.provider.Settings
@ghasemdev
ghasemdev / DataClass.kt
Last active October 10, 2021 18:10
Advanced Kotlin (DataClass, Delegation, InlineClass, InnerClass, Object, SealedClass, TypeAlias)
fun main(args: Array<String>) {
val reza = Student("reza", 22)
val ghasem = Student("ghasem", 22)
println(ghasem.hashCode())
}
/*class Student(val name: String, private val age: Int) {
fun printPlan() = "Plan"