Skip to content

Instantly share code, notes, and snippets.

View alimd's full-sized avatar
👨‍💻
wesun.org

S. Ali Mihandoost alimd

👨‍💻
wesun.org
View GitHub Profile
@alimd
alimd / fix-persian-number.js
Last active August 10, 2022 19:16
Convert/Fix persian and arabic numbers inside a string to english in javascript, AliMD Edition ;)
(() => {
'use strict';
const
// Establish the root object, `window` (`self`) in the browser, `global`
// on the server, or `this` in some virtual machines. We use `self`
// instead of `window` for `WebWorker` support.
root = (() => {
if (typeof self == 'object' && self.self === self) return self;
else if (typeof global == 'object' && global.global === global) return global;
@alimd
alimd / test
Created May 10, 2015 13:40
9573168225694
### Google Index test file
test 9573168225694
test 9573168225694
test 9573168225694
test 9573168225694
test 9573168225694
test 9573168225694
test 9573168225694
test 9573168225694
@alimd
alimd / test
Created May 10, 2015 13:40
9573168225694
### Google Index test file
test 9573168225694
test 9573168225694
test 9573168225694
test 9573168225694test 9573168225694
test 9573168225694
test 9573168225694
@alimd
alimd / test
Created May 10, 2015 13:40
9573168225694
### Google Index test file
test 9573168225694
test 9573168225694
test 9573168225694
test 9573168225694
@alimd
alimd / gist:84d1c5a0e76cb85bdbb4
Created May 10, 2015 07:21
google persian number test: تست ۹۶۵۸۷۴۱۲۵۸۴
تست ۹۶۵۸۷۴۱۲۵۸۴
تست ۹۶۵۸۷۴۱۲۵۸۴
تست ۹۶۵۸۷۴۱۲۵۸۴
تست ۹۶۵۸۷۴۱۲۵۸۴
تست ۹۶۵۸۷۴۱۲۵۸۴
تست ۹۶۵۸۷۴۱۲۵۸۴
تست ۹۶۵۸۷۴۱۲۵۸۴
تست ۹۶۵۸۷۴۱۲۵۸۴
@alimd
alimd / designer.html
Last active August 29, 2015 14:19
designer
<link rel="import" href="../polymer/polymer.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
height: 100%;
body {
background-color: #333;
overflow: hidden;
color: #FFF;
-webkit-user-select: none;
}
.parent {
width: 100%;
position: relative;
@alimd
alimd / regular-expression-iranian-mobile.md
Last active September 26, 2024 20:59
Best Regular Expression for Detect Iranian Mobile Phone Numbers

Best Regular Expression for Detect Iranian Mobile Phone Numbers

I'm sure its best regular expression for detect iranian mobile number.

(0|\+98)?([ ]|,|-|[()]){0,2}9[1|2|3|4]([ ]|,|-|[()]){0,2}(?:[0-9]([ ]|,|-|[()]){0,2}){8}


use in javascript

@alimd
alimd / map.geojson
Created August 17, 2013 10:13
via:geojson.io
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.