Skip to content

Instantly share code, notes, and snippets.

View eby-dev's full-sized avatar
:octocat:

𝓔𝓫𝔂 eby-dev

:octocat:
View GitHub Profile
@Zxce3
Zxce3 / index.php
Last active June 18, 2025 18:46
server dashboard in one file [WIP] Updated V2
<?php
/**
* Server Dashboard - Simplified System Information Display
* This file contains functions to retrieve system information and display it in a server dashboard.
* The functions include getting basic server info, CPU info, memory usage, disk usage, uptime, load average,
* network interfaces, and process list.
*
* @author Zxce3
* @version 2.0
@SurajBahadur
SurajBahadur / RootUtil.kt
Created June 13, 2023 05:01
Code to check whether device is rooted or not in android
import android.animation.ObjectAnimator
import android.animation.PropertyValuesHolder
import android.content.Context
import android.content.Intent
import android.content.pm.PackageManager
import android.os.Build
import android.util.Log
import android.view.View
import android.view.animation.AccelerateDecelerateInterpolator
import com.prepladder.medical.prepladder.model.DataItem
@oianmol
oianmol / QrScannerScreen.android.kt
Last active December 12, 2024 12:10
QR Code Scanner with Jetbrains Jetpack compose multiplatform!
import android.Manifest
import android.content.pm.PackageManager
import android.util.Log
import android.view.ViewGroup
import androidx.activity.compose.rememberLauncherForActivityResult
import androidx.activity.result.contract.ActivityResultContracts
import androidx.camera.core.CameraSelector
import androidx.camera.core.ImageAnalysis
import androidx.camera.core.Preview
import androidx.camera.lifecycle.ProcessCameraProvider
@abdullahnettoor
abdullahnettoor / flutter-ci.yml
Created March 11, 2022 14:42
Flutter - Build APK through GitHub Actions
name: Flutter CI
# This workflow is triggered on pushes to the repository.
on:
push:
branches:
- master
@manoj-mili
manoj-mili / PostAdapterGist.kt
Created August 9, 2020 19:04
Implementing Recyclerview Adapter with DiffCallBack
class PostAdapter :
ListAdapter<Post, PostAdapter.ViewHolder>(TaskDiffCallBack()) {
//This check runs on background thread
class TaskDiffCallBack : DiffUtil.ItemCallback<Post>() {
override fun areItemsTheSame(oldItem: Post, newItem: Post): Boolean {
Log.d(TAG,Thread.currentThread().name)
return oldItem.id == newItem.id;
}
@MohammadSamandari
MohammadSamandari / Android-AlarmManager.md
Last active August 6, 2024 22:44
Android Alarm Manager

Alarm Manager

how to use alarms to trigger tasks at specific times, whether or not your app is running when the alarms go off.

For example, you can use a repeating alarm to schedule a download every day at the same time.

To create alarms, you use the AlarmManager class. Alarms in Android have the following characteristics:

  • Alarms let you send an Intent at set times or intervals. You can use alarms with broadcast receivers to start services and perform other operations.
  • Alarms operate outside your app. You can use them to trigger events or actions even when your app isn't running, and even if the device is asleep.
  • When used correctly, alarms can help you minimize your app's resource requirements. For example, you can schedule operations without relying on timers or continuously running background services.
@nyancodeid
nyancodeid / commit-message-id.md
Last active November 3, 2025 02:45
Commit Message Guidelines

Pedoman Commit Message

Kami memiliki aturan yang sangat tepat tentang bagaimana pesan git commit kami dapat diformat. Ini mengarah ke pesan yang lebih mudah dibaca yang mudah diikuti ketika melihat melalui history proyek. Dan juga, kami menggunakan pesan git commit untuk menghasilkan log perubahan pada Angular.

Format Commit Message

Setiap pesan komit terdiri dari header, konten, dan catatan kaki. Judul memiliki format khusus yang mencakup jenis, cakupan, dan subjek:

<type>(<scope>): <subject>
<BLANK LINE>
@nishantkp
nishantkp / Network.java
Last active October 24, 2023 16:27
Find out application is connected to WIFI or cellular
/**
* Get reference to the connectivity manager
*/
ConnectivityManager connectivityManager =
(ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
/**
* Find out whether device is connected to wifi or cellular at the moment
*/
public NetworkType getNetworkType() {
@bkanhu
bkanhu / beginners_ubuntu.md
Last active October 28, 2025 09:19
A Beginners Guide on Things To Do After Installing Ubuntu.

Beginners Ubuntu

A Beginners Guide To Things To Do After Installing Ubuntu.

1. Check For Updates

sudo apt update && sudo apt upgrade

2. Enable additional repositories for more software

Ubuntu has several repositories from where it provides software for your system. Enabling all these repositories will give you access to more software and proprietary drivers.