Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View amolood's full-sized avatar
🌍
Working

ABDALRAHMAN MOLOOD amolood

🌍
Working
View GitHub Profile
@amolood
amolood / arabic-country-dropdown-list.html
Created August 29, 2016 00:58 — forked from AmrMekkawy/arabic-country-dropdown-list.html
Arabic countries HTML "select" element (dropdown list)
<!-- Country List in Arabic | source: https://github.com/umpirsky/country-list -- >
<select name="country">
<option value="AW">آروبا</option>
<option value="AZ">أذربيجان</option>
<option value="AM">أرمينيا</option>
<option value="ES">أسبانيا</option>
<option value="AU">أستراليا</option>
<option value="AF">أفغانستان</option>
<option value="AL">ألبانيا</option>
<option value="DE">ألمانيا</option>
@amolood
amolood / MyApp.java
Created March 19, 2017 00:17 — forked from artem-zinnatullin/MyApp.java
If you need to set one font for all TextViews in android application you can use this solution. It will override ALL TextView's typefaces, includes action bar and other standard components, but EditText's password font won't be overriden.
public class MyApp extends Application {
@Override
public void onCreate() {
TypefaceUtil.overrideFont(getApplicationContext(), "SERIF", "fonts/Roboto-Regular.ttf"); // font from assets: "assets/fonts/Roboto-Regular.ttf
}
}
@amolood
amolood / arabic-date-format.php
Created August 29, 2016 01:02 — forked from AmrMekkawy/arabic-date-format.php
A PHP function to format Arabic date to be user friendly and more readable (Twitter Like)
<?php
function arabic_date_format($timestamp)
{
$periods = array(
"second" => "ثانية",
"seconds" => "ثواني",
"minute" => "دقيقة",
"minutes" => "دقائق",
"hour" => "ساعة",
@amolood
amolood / arabic_numerals.php
Created August 29, 2016 01:00 — forked from kadimi/arabic_numerals.php
Convert numbers in Arabic
<?php
/**
* Converts numbers in string from western to eastern Arabic numerals.
*
* @param string $str Arbitrary text
* @return string Text with western Arabic numerals converted into eastern Arabic numerals.
*/
function arabic_w2e($str) {
$arabic_eastern = array('٠', '١', '٢', '٣', '٤', '٥', '٦', '٧', '٨', '٩');