Skip to content

Instantly share code, notes, and snippets.

@Abdallah-Abdelazim
Abdallah-Abdelazim / multiple_ssh_setting.md
Created February 18, 2023 23:56 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
@Abdallah-Abdelazim
Abdallah-Abdelazim / #android_filterable_example.md
Last active May 5, 2023 21:45 — forked from DeepakRattan/Bean.java
Filtering ListView using Filterable interface

Android Filterable Example:

This is an example of using Filterable with a SearchView to filter the data of a ListView adapter.

@Abdallah-Abdelazim
Abdallah-Abdelazim / drawablegen.sh
Last active November 30, 2023 22:16 — forked from Kishanjvaghela/converter.sh
drawablegen - A shell script to resize icon images and generate the alternative drawables with the proper screen pixel densities (dip) for Android.
#!/bin/sh
# A shell script to resize icon images and generate the alternative drawables with the proper screen pixel densities (dip) for Android.
# The passed icon image would be the xxxhdpi drawable & the other drawables (xxhdpi, xhdpi, hdpi & mdpi) would be scaled down from that.
# How to use:
# ./drawablegen.sh <icon image file relative path>
# Example:
# ./drawablegen.sh my_image.png
# This will create all the drawable folders, if not has already, in a res folder inside the current directory (as returned by pwd).
# Use only with PNG images.
# Requires ImageMagick to be installed & added to the path environment variable. Install with: sudo apt install imagemagick
@Abdallah-Abdelazim
Abdallah-Abdelazim / BcdConverter.java
Last active February 23, 2026 19:53
BCD Conversion in Java
/**
* Convert between decimal & BCD (binary-coded decimal).
*/
public class BcdConverter {
/**
* Encodes a positive integer number into an unsigned packed BCD.
*
* @param num a positive integer number to encode (maximum value of 2<sup>63</sup>-1).
* @return BCD representation of the passed number argument.