Skip to content

Instantly share code, notes, and snippets.

View Mojtaba-Shafaei's full-sized avatar

Mojtaba shafaei Mojtaba-Shafaei

View GitHub Profile
@Mojtaba-Shafaei
Mojtaba-Shafaei / ZoneIds.txt
Created February 7, 2023 14:45
All time zones sorted by offset
Etc/GMT+12 (UTC-12:00)
Pacific/Pago_Pago (UTC-11:00)
Pacific/Samoa (UTC-11:00)
Pacific/Niue (UTC-11:00)
US/Samoa (UTC-11:00)
Etc/GMT+11 (UTC-11:00)
Pacific/Midway (UTC-11:00)
Pacific/Honolulu (UTC-10:00)
Pacific/Rarotonga (UTC-10:00)
Pacific/Tahiti (UTC-10:00)
@Mojtaba-Shafaei
Mojtaba-Shafaei / instal-v2ray-tls.txt
Created January 14, 2023 18:27
install trojan+vless+vmess+tls
apt update && apt upgrade -y
https://github.com/mack-a/v2ray-agent
wget -P /root -N --no-check-certificate "https://raw.githubusercontent.com/mack-a/v2ray-agent/master/install.sh" && chmod 700 /root/install.sh && /root/install.sh
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!--<editor-fold desc="Holo">-->
<color name="Color_AliceBlue">#F0F8FF</color>
<color name="Color_AntiqueWhite">#FAEBD7</color>
<color name="Color_Aqua">#00FFFF</color>
<color name="Color_Aquamarine">#7FFFD4</color>
<color name="Color_Azure">#F0FFFF</color>
<color name="Color_Beige">#F5F5DC</color>
<color name="Color_Bisque">#FFE4C4</color>
@Mojtaba-Shafaei
Mojtaba-Shafaei / OpacityOfBLACKonWHITE.md
Last active June 12, 2021 09:58
Opacity of BLACK on WHITE
RGB HEX Opacity of BLACK on WHITE
(0,0,0) #000000 100%
(3,3,3) #303030 99%
(5,5,5) #505050 98%
(8,8,8) #808080 97%
(10,10,10) #0A0A0A 96%
(13,13,13) #0D0D0D 95%
(15,15,15) #0F0F0F 94%
(18,18,18) #121212 93%
import android.graphics.Canvas
import android.graphics.Color
import android.graphics.Rect
import android.graphics.drawable.ColorDrawable
import android.view.View
import androidx.annotation.ColorInt
import androidx.core.view.ViewCompat
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
@Mojtaba-Shafaei
Mojtaba-Shafaei / App.java
Last active September 22, 2020 15:40 — forked from patrickhammond/gist:0b13ec35160af758d98c
Sample for how to use the Google Play Services dynamic security provider to keep the SSL library that the app will use to up date.
package com.mycompany.myapp.app;
import android.app.Application;
import android.content.Intent;
import com.google.android.gms.common.GooglePlayServicesUtil;
import com.google.android.gms.security.ProviderInstaller;
import com.google.android.gms.security.ProviderInstaller.ProviderInstallListener;
public class MainApplication extends Application {
@Mojtaba-Shafaei
Mojtaba-Shafaei / TintableImageView.java
Created June 24, 2020 11:57 — forked from tylerchesley/TintableImageView.java
Backwards compatible TintableImageView
package com.example.widgets;
import android.content.Context;
import android.content.res.ColorStateList;
import android.content.res.TypedArray;
import android.util.AttributeSet;
import android.widget.ImageView;
import com.example.R;
package com.mabnadp.rahavard365.utils
import android.graphics.Paint
import android.graphics.Typeface
import android.text.TextPaint
import android.text.style.TypefaceSpan
class CustomTypefaceSpan(private val newType: Typeface) : TypefaceSpan(null) {
override fun updateDrawState(ds: TextPaint) {
@Mojtaba-Shafaei
Mojtaba-Shafaei / GoogleStyleCopy.xml
Last active June 23, 2020 06:42
GoogleStyle for Android projects
<code_scheme name="GoogleStyle copy" version="173">
<option name="OTHER_INDENT_OPTIONS">
<value>
<option name="INDENT_SIZE" value="2" />
<option name="CONTINUATION_INDENT_SIZE" value="4" />
<option name="TAB_SIZE" value="2" />
</value>
</option>
<option name="RIGHT_MARGIN" value="180" />
<AndroidXmlCodeStyleSettings>
@Mojtaba-Shafaei
Mojtaba-Shafaei / fast_delete.bat
Last active March 17, 2021 19:55
Fast delete in windows
#copy this file to c:\windows
@ECHO OFF
ECHO Delete Folder: %CD%?
PAUSE
SET FOLDER=%CD%
CD /
DEL /F/Q/S "%FOLDER%" > NUL
RMDIR /Q/S "%FOLDER%"
EXIT