Skip to content

Instantly share code, notes, and snippets.

View geminorum's full-sized avatar
🏠
Working from home

Nasser Rafie geminorum

🏠
Working from home
View GitHub Profile
@geminorum
geminorum / Convert like-Persian characters to Persian characters
Created October 24, 2019 12:35 — forked from amirmojiry/Convert like-Persian characters to Persian characters
A PHP function for convert like-Persian characters to Persian characters
<?php
function convert_non_persian_chars_to_persian ($str) {
//main goal: arabic chars: from ؀ U+0600 (&#1536;) to ۿ U+06FF (&#1791;)
//source: https://unicode-table.com/en
$right_chars = array (
'ا',
'ب',
'پ',
'ت',
'ث',
@geminorum
geminorum / bootstrap-4-sass-mixins-cheat-sheet.scss
Created November 29, 2019 06:14 — forked from mattez/bootstrap-4-sass-mixins-cheat-sheet.scss
Bootstrap 4 Sass Mixins [Cheat sheet with examples] #BS4
/* -------------------------------------------------------------------------- */
// All Bootstrap 4 Sass Mixins [Cheat sheet]
// @author http://anschaef.de
// @see https://github.com/twbs/bootstrap/tree/v4-dev/scss/mixins
/* -------------------------------------------------------------------------- */
// Grid variables
$grid-columns: 12 !default;
$grid-gutter-width: 30px !default;
@geminorum
geminorum / remove-message.js
Created January 2, 2020 18:15 — forked from simonw/remove-message.js
JavaScript one-liner for removing a ?message=... parameter from the visible URL in the browser
history.replaceState && history.replaceState(
null, '', location.pathname + location.search.replace(/[\?&]message=[^&]+/, '').replace(/^&/, '?')
);
@geminorum
geminorum / languages.json
Created March 26, 2023 04:22 — forked from joshuabaker/languages.json
List of languages with ISO 639-1 Alpha-2 codes in JSON.
[
{
"code": "aa",
"name": "Afar",
"native": "Afar"
},
{
"code": "ab",
"name": "Abkhazian",
"native": "Аҧсуа"
(function( $, document ){
var enablePlaceholders = {
init: function( el ){
var $t = this, $ = jQuery;
$t.el = $(el).data( 'hasplaceholder', true );
$t.placeholder = $t.el.attr('placeholder');
$t.addPlaceholder( $t.el );
} // init