Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

mohammad mahmoodi mm580486

🎯
Focusing
Block or report user

Report or block mm580486

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View dsfs.js
var STATES_LIST = JSON.parse($('#state_codes').text());
function initStates() {
STATES_LIST.forEach(function(item, index) {
var newOption = new Option(item.name, item.state_code, false, false);
$('#states').append(newOption).trigger('change');
})
}
View blah.js
var STATES = JSON.parse($('#states').text());
function initStates() {
states.forEach(function(item, index) {
var newOption = new Option(item.PNAME, item.STATE_CODE, false, false);
$('#states').append(newOption).trigger('change');
})
}
View asd.js
var states = [{
"STATE_CODE": 31,
"PNAME": "البرز",
"ENAME": "Alborz"
}, {
"STATE_CODE": 1,
"PNAME": "تهران",
"ENAME": "Tehran"
View aaa
$('input[type=radio][name=paymentMethod]').change(function() {
var radio = $(this);
var weight = $('.weight').text();
var price = $('.client-shop-all-price').text();
var request = $.ajax({
url: "https://newkhat.khatoghalam.com/api/shop/v1/add-to-cart",
type: "POST",
cache: false,
data: {
@mm580486
mm580486 / remove-emoji.rb
Last active Mar 16, 2018
remove emoji from string - ruby
View remove-emoji.rb
# method base
def clean_emoji(str='')
str=str.force_encoding('utf-8').encode
arr_regex=[/[\u{1f600}-\u{1f64f}]/,/[\u{2702}-\u{27b0}]/,/[\u{1f680}-\u{1f6ff}]/,/[\u{24C2}-\u{1F251}]/,/[\u{1f300}-\u{1f5ff}]/]
arr_regex.each do |regex|
str = str.gsub regex, ''
end
return str
end
# sample
View keybase.md

Keybase proof

I hereby claim:

  • I am mm580486 on github.
  • I am mm580486 (https://keybase.io/mm580486) on keybase.
  • I have a public key whose fingerprint is 5F4D 8C59 1AB5 8E19 467E 03E0 AEA5 406C 03D0 CC17

To claim this, I am signing this object:

You can’t perform that action at this time.