Skip to content

Instantly share code, notes, and snippets.

View rasadeghnasab's full-sized avatar

Ramin rasadeghnasab

  • Berlin, Germany
  • 10:41 (UTC +01:00)
View GitHub Profile
@rasadeghnasab
rasadeghnasab / number_to_persian_word.php
Created October 23, 2021 22:35
A JS function that receive a Persian number and converts it to words.
<?php
function numberInLetters($number) {
$separator = $hyphen = $conjunction = ' و ';
$negative = 'منفی ';
$decimal = ' ممیز ';
$dictionary = array(
0 => 'صفر',
1 => 'یک',
@rasadeghnasab
rasadeghnasab / number_to_persian_word.js
Created October 23, 2021 22:33
A JS function that converts Persian numbers to words.
function numberInLetters(number) {
var separator = hyphen = conjunction = ' و ';
var negative = 'منفی ';
var decimal = ' ممیز ';
var dictionary = {
0: 'صفر',
1: 'یک',
2: 'دو',
3: 'سه',
4: 'چهار',
@rasadeghnasab
rasadeghnasab / script.js
Last active October 23, 2021 22:38
parallax_js
$(document).ready(function(){
$(window).on('scroll',function(e){
parallax();
});
$('a.earth,a.moon,a.saturn,a.rocket').on('click', function(e){
e.preventDefault();
var th = $(this),
target = $(this).attr('href'),
next_pos = $(target).offset().top,
current_pos = $(window).scrollTop(),