Skip to content

Instantly share code, notes, and snippets.

View amr3k's full-sized avatar
🏠
Working from home

A̴m̴r̴ ع̲مِےـرۅ amr3k

🏠
Working from home
View GitHub Profile
export function detangle() {
let blocked = false
return callback => (...args) => {
if (blocked) return
blocked = true
callback(...args)
import canvas from '@napi-rs/canvas' // For canvas.
import fs from 'fs' // For creating files for our images.
import cwebp from 'cwebp' // For converting our images to webp.
// Load in the fonts we need
GlobalFonts.registerFromPath('./fonts/Inter-ExtraBold.ttf', 'InterBold');
GlobalFonts.registerFromPath('./fonts/Inter-Medium.ttf','InterMedium');
GlobalFonts.registerFromPath('./fonts/Apple-Emoji.ttf', 'AppleEmoji');
// This function accepts 6 arguments:
@hinell
hinell / Fix Broken EDID Guide.md
Last active August 8, 2024 12:57
Guide how to achieve better resolution with broken EDID. Two methods are used: xorg.conf config and kernel params.

Fix Broken EDID Guide

This guide outlines replacement of the broken EDID metadata file for the device in Linux Operating Systems.

Last-Modified: Sunday, April 11, 2021

• • •

@mrtcmn
mrtcmn / workaround.css
Created November 27, 2020 15:04
firefox backdrop-filter workaround
@supports (-webkit-backdrop-filter: none) or (backdrop-filter: none) {
.blurred-container {
-webkit-backdrop-filter: blur(10px);
backdrop-filter: blur(10px);
}
}
/* slightly transparent fallback for Firefox (not supporting backdrop-filter) */
@supports not ((-webkit-backdrop-filter: none) or (backdrop-filter: none)) {
.blurred-container {
@yassineaboukir
yassineaboukir / List of API endpoints & objects
Last active November 17, 2024 16:48
A list of 3203 common API endpoints and objects designed for fuzzing.
0
00
01
02
03
1
1.0
10
100
1000
@herrkaefer
herrkaefer / colored_logger.py
Last active May 18, 2019 00:14
Simple Python colored logging with crayons
import logging
import crayons
# Define logging colors here
LOGGING_STYLES = {
'debug': {'color': 'white', 'bold': False},
'info': {'color': 'green', 'bold': True},
'warning': {'color': 'magenta', 'bold': True},
'error': {'color': 'yellow', 'bold': True},
@oseme-techguy
oseme-techguy / Correct_GnuPG_Permission.sh
Last active November 4, 2024 08:39
This fixes the " gpg: WARNING: unsafe permissions on homedir '/home/path/to/user/.gnupg' " error while using Gnupg .
#!/usr/bin/env bash
# To fix the " gpg: WARNING: unsafe permissions on homedir '/home/path/to/user/.gnupg' " error
# Make sure that the .gnupg directory and its contents is accessibile by your user.
chown -R $(whoami) ~/.gnupg/
# Also correct the permissions and access rights on the directory
chmod 600 ~/.gnupg/*
chmod 700 ~/.gnupg
@michaeljymsgutierrez
michaeljymsgutierrez / Fastboot_cmd.txt
Created October 5, 2017 01:14
Fastboot command lines for android
1. Flashing the recovery image:
fastboot flash recovery recovery.img
2. Flash the kernel and bootloader:
fastboot flash boot boot.img
3. Erase a partition:
fastboot erase cache
@peteristhegreat
peteristhegreat / freedesktop.org_icons_with_descriptions.txt
Last active August 20, 2024 15:18
QIcon::fromTheme, List of icons in gnome theme, in qt standardPixmaps and list on freedesktop.org
# https://specifications.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html, aggregate list from each section
address-book-new The icon used for the action to create a new address book.
application-exit The icon used for exiting an application. Typically this is seen in the application's menus as File->Quit.
appointment-new The icon used for the action to create a new appointment in a calendaring application.
call-start The icon used for initiating or accepting a call. Should be similar to the standard cellular call pickup icon, a green handset with ear and mouth pieces facing upward.
call-stop The icon used for stopping a current call. Should be similar to the standard cellular call hangup icon, a red handset with ear and mouth pieces facing downward.
contact-new The icon used for the action to create a new contact in an address book application.
document-new The icon used for the action to create a new document.
document-open The icon used for the action to open a document.
document-open-recent T
@amratab
amratab / heroku_multiple_remotes_multiple_branches
Created May 30, 2017 04:30
Adding multiple heroku apps to a single repository different branches
Suppose you have two heroku remote apps
myapp-dev & myapp-prod
and two git branches
master(for dev) & production
Now lets setup heroku on the existing git repo in your local machine
Assuming the branches and the apps exist already
git remote add heroku-myapp-dev https://git.heroku.com/myapp-dev.git
git remote add heroku-myapp-prod https://git.heroku.com/myapp-prod.git