git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
| (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 |
| [ | |
| { | |
| "code": "aa", | |
| "name": "Afar", | |
| "native": "Afar" | |
| }, | |
| { | |
| "code": "ab", | |
| "name": "Abkhazian", | |
| "native": "Аҧсуа" |
| history.replaceState && history.replaceState( | |
| null, '', location.pathname + location.search.replace(/[\?&]message=[^&]+/, '').replace(/^&/, '?') | |
| ); |
| /* -------------------------------------------------------------------------- */ | |
| // 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; |
| <?php | |
| function convert_non_persian_chars_to_persian ($str) { | |
| //main goal: arabic chars: from U+0600 (؀) to ۿ U+06FF (ۿ) | |
| //source: https://unicode-table.com/en | |
| $right_chars = array ( | |
| 'ا', | |
| 'ب', | |
| 'پ', | |
| 'ت', | |
| 'ث', |
| function extend(target_object) { | |
| // Look for additional parameters in this function | |
| // eg. extend(target_object, ....a,b,c,d) | |
| if (!arguments[1]) { | |
| return; | |
| } | |
| // If any extra arguments, which are objects | |
| // loop through them | |
| for (var index = 1; index < arguments.length; index++) { |
git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
| // @SOURCE: https://stackoverflow.com/a/4673436/4864081 | |
| // First, checks if it isn't implemented yet. | |
| if (!String.prototype.format) { | |
| String.prototype.format = function() { | |
| var args = arguments; | |
| return this.replace(/{(\d+)}/g, function(match, number) { | |
| return typeof args[number] != 'undefined' | |
| ? args[number] | |
| : match |
| <?php | |
| namespace WPSE; | |
| /** Plugin Name: Google JSAPI test plugin */ | |
| add_action( 'admin_enqueue_scripts', __NAMESPACE__.'\addScripts' ); | |
| function addScripts() | |
| { | |
| wp_enqueue_script( |
| <?php | |
| /* | |
| Copyright (c) 2012, Manu Manjunath | |
| All rights reserved. | |
| Redistribution and use of this program in source/binary forms, with or without modification are permitted. | |
| Link to this gist is preferred, but not a condition for redistribution/use. | |
| */ | |
| function mail_with_attachments($to, $subject, $message, Array $filepaths, $from = null, $replyto = null) { |