Skip to content

Instantly share code, notes, and snippets.

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

Saeed hasanisaeed

🏠
Working from home
View GitHub Profile
@hasanisaeed
hasanisaeed / fa2EnDigits.js
Last active July 12, 2021 12:30
Convert Persian digits to English digits.
fa2EnDigits(str) {
str = String(str);
var e = '۰'.charCodeAt(0);
str = str.replace(/[۰-۹]/g, function (t) {
return t.charCodeAt(0) - e;
});
e = '٠'.charCodeAt(0);
str = str.replace(/[٠-٩]/g, function (t) {
return t.charCodeAt(0) - e;
});
@hasanisaeed
hasanisaeed / make_app.sh
Created June 29, 2021 12:40
Generate APK file without IDE
#!/bin/bash
#mkdir -p { src/com/example/hellovirgool, obj, bin, res/layout, res/values, res/drawable}
#Define the help function
function help() {
echo "Options:"
echo "-package Package Name"
echo "-sdk SDK Path"
echo "-name Application Name"