Skip to content

Instantly share code, notes, and snippets.

View amiresp's full-sized avatar
😒
I maybe slow to response

Amir Spalani amiresp

😒
I maybe slow to response
View GitHub Profile
@amiresp
amiresp / function.php
Last active August 21, 2022 18:24
Remove rel="noopener noreferrer" in TinyMCE links
<?php
/**
* Remove rel="noopener noreferrer" in TinyMCE links
*
* @param array $init
* @return array
*/
add_filter('tiny_mce_before_init', function ($init) {
$init['allow_unsafe_link_target'] = true;
@amiresp
amiresp / fix-persian-number.js
Created August 10, 2022 19:16 — forked from AliMD/fix-persian-number.js
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;
@amiresp
amiresp / move.sh
Last active July 9, 2022 21:48
rsync.sh
set -Eeuo pipefail
trap "echo '❌ Error'" ERR
echoStep () {
echo "🔹 $1"
}
error () {
[user]
name = "Amir Espelani "
email = abasirat92@gmail.com
[alias]
c = commit -m
ca = commit -am
cl = clone
pl = pull
p = push

Keybase proof

I hereby claim:

  • I am amiresp on github.
  • I am amiresp (https://keybase.io/amiresp) on keybase.
  • I have a public key whose fingerprint is FF08 956E B672 34AD D2A4 E7B0 E88E CCCB 8D0A 6F08

To claim this, I am signing this object:

@amiresp
amiresp / .gitconfig
Last active July 18, 2019 01:14
Amiresp Git Config
[user]
email = abasirat92@gmail.com
name = Amiresp
[alias]
s = status
cl = clone
co = checkout
c = commit -m
ca = commit -am