Skip to content

Instantly share code, notes, and snippets.

View moneer-muntazah's full-sized avatar

moneer-muntazah

View GitHub Profile

Setup multiple git identities & git user informations

/!\ Be very carrefull in your setup : any misconfiguration make all the git config to fail silently ! Go trought this guide step by step and it should be fine 😉

Setup multiple git ssh identities for git

  • Generate your SSH keys as per your git provider documentation.
  • Add each public SSH keys to your git providers acounts.
  • In your ~/.ssh/config, set each ssh key for each repository as in this exemple:
@moneer-muntazah
moneer-muntazah / android-send-push-locally-using-adb.adoc
Created May 24, 2022 12:08 — forked from tolpp/android-send-push-locally-using-adb.adoc
This gist explains how to send push notification locally using ADB without need network connection.

Requirements:

  • Device should be a rooted (simulator’s are rooted by default)

  • adbd should be started as root. (Rub command: adb root )

Now, send local push message using command:

import 'dart:math';
import 'package:flutter/material.dart';
MaterialColor generateMaterialColor(Color color) {
return MaterialColor(color.value, {
50: tintColor(color, 0.5),
100: tintColor(color, 0.4),
200: tintColor(color, 0.3),
300: tintColor(color, 0.2),
400: tintColor(color, 0.1),
# Generate a new pgp key: (better to use gpg2 instead of gpg in all below commands)
gpg --gen-key
# maybe you need some random work in your OS to generate a key. so run this command: `find ./* /home/username -type d | xargs grep some_random_string > /dev/null`
# check current keys:
gpg --list-secret-keys --keyid-format LONG
# See your gpg public key:
gpg --armor --export YOUR_KEY_ID
# YOUR_KEY_ID is the hash in front of `sec` in previous command. (for example sec 4096R/234FAA343232333 => key id is: 234FAA343232333)