Skip to content

Instantly share code, notes, and snippets.

View Ademking's full-sized avatar
🍪
Eating Cookies

Adem Kouki Ademking

🍪
Eating Cookies
View GitHub Profile
@Ademking
Ademking / nearest.js
Created June 14, 2020 23:23
JS: Find Nearest Color from Array
const baseColors = [
{
"hex": "#FFFFFF",
"name": "White",
},
{
"hex": "#000000",
"name": "Black",
},
{
@Ademking
Ademking / README.md
Last active April 24, 2024 12:05
How to install acunetix (linux)
@Ademking
Ademking / README.md
Created May 28, 2019 04:39
Laravel How to use Auto Increment with MongoDB (jenssegers)
  1. In your model, add these methods :
    public function nextid()
    {
        // ref is the counter - change it to whatever you want to increment
        $this->ref = self::getID();
    }

 public static function bootUseAutoIncrementID()
@Ademking
Ademking / Certificate.tsx
Created March 19, 2024 07:24
Certificate
import { Page, Text, View, StyleSheet, Document, Font, Image } from "@react-pdf/renderer";
import { containsArabic } from "../utils/utils";
Font.register({
family: "Noto Sans Arabic",
src: "https://cdn.jsdelivr.net/npm/@expo-google-fonts/noto-sans-arabic@0.2.3/NotoSansArabic_400Regular.ttf",
});
Font.register({
family: "Work Sans",
@Ademking
Ademking / readme.md
Last active March 14, 2024 11:02
💚 Android : Send SMS through ADB

(Android 5)

Run :

adb shell service call isms 9 s16 "com.android.mms" s16 "123456789" s16 "null" s16 "MESSAGEBODY" s16 "null" s16 "null"

The method is :

@Ademking
Ademking / dark.css
Created February 17, 2024 00:31
Tlk.io Themes
header {
display: none;
}
.info {
display: none;
}
.button.button {
color: #999999;
@Ademking
Ademking / dark-theme.css
Last active February 11, 2024 05:17
tlk.io dark theme
/* tlk.io night theme */
.button.button {
color: #999999;
border-color: rgba(0,0,0,0.4);
background-color: #3d4148;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, rgba(255,255,255,0.05)), color-stop(100%, rgba(255,255,255,0)));
background-image: -webkit-linear-gradient(top, rgba(255,255,255,0.05), rgba(255,255,255,0));
background-image: -moz-linear-gradient(top, rgba(255,255,255,0.05), rgba(255,255,255,0));
@Ademking
Ademking / README.md
Last active December 22, 2023 14:21
Windows 10 - Remove Garbage apps

(UPDATE): Remove Bloatware using "Windows10Debloater" [with GUI]

  1. Run Powershell (as admin)

  2. Copy/paste

 iex ((New-Object System.Net.WebClient).DownloadString('https://git.io/debloat')) 
@Ademking
Ademking / readme.md
Last active November 5, 2023 15:48
💚 Android : How to record events and play them using ADB SHELL

1) Know the event name of touchpad :

Run :

adb shell getevent -pl

Search for : "ABS_MT_TRACKING_ID" - example :

@Ademking
Ademking / README.md
Last active September 16, 2023 02:45
Ag-grid (Angular) Go FullScreen without breaking modals and other elements

Ag-grid (Angular) Go FullScreen without breaking modals and other elements

The problem

I was working with Ag-grid and Ng-zorro (Ant Design), and I needed to go set the data-table to full-screen mode, but I was having issues with the modals and other elements breaking. Modal not showing up, or dropdowns not working, etc.

I found a solution that worked for me, and I wanted to share it with you.

The solution