Remove emojicons integration
481517
public function featureEmojicons()
    {
        remove_action('wp_head', 'print_emoji_detection_script', 7);
        remove_action('admin_print_scripts', 'print_emoji_detection_script');
        remove_action('wp_print_styles', 'print_emoji_styles');
        remove_action('admin_print_styles', 'print_emoji_styles');
        remove_filter('the_content_feed', 'wp_staticize_emoji');
        remove_filter('comment_text_rss', 'wp_staticize_emoji');
        remove_filter('wp_mail', 'wp_staticize_emoji_for_email');

        add_filter('tiny_mce_plugins', function ($plugins) {
            return is_array($plugins) ? array_diff($plugins, ['wpemoji']) : [];
        });

        add_filter('wp_resource_hints', function ($urls, $relation_type) {
            if ('dns-prefetch' === $relation_type) {
                $emoji_url = 'https://s.w.org/images/core/emoji/';

                foreach ($urls as $key => $url) {
                    if (false !== strpos($url, $emoji_url)) {
                        unset($urls[$key]);
                    }
                }
            }

            return $urls;
        }, 10, 2);
    }
1313162
async function deleteUnspecifiedTypes(options) {
  const { outputDir, fontName, types } = options

  for (let ext of FONT_TYPES) {
    if (types.indexOf(ext) !== -1) { continue }

    let filepath = path.resolve(outputDir, `${ fontName }.${ ext }`)

    if (await fsAsync.exists(filepath)) {
      await fsAsync.unlink(filepath)
    }
  }
}
243631
function deinit() {
        _isInitialized = false;

        KeyBindingManager.removeBinding(collapseKey);
        KeyBindingManager.removeBinding(expandKey);
        KeyBindingManager.removeBinding(collapseAllKey);
        KeyBindingManager.removeBinding(expandAllKey);
        KeyBindingManager.removeBinding(collapseAllKeyMac);
        KeyBindingManager.removeBinding(expandAllKeyMac);

        //remove menus
        Menus.getMenu(Menus.AppMenuBar.VIEW_MENU).removeMenuDivider(codeFoldingMenuDivider.id);
        Menus.getMenu(Menus.AppMenuBar.VIEW_MENU).removeMenuItem(COLLAPSE);
        Menus.getMenu(Menus.AppMenuBar.VIEW_MENU).removeMenuItem(EXPAND);
        Menus.getMenu(Menus.AppMenuBar.VIEW_MENU).removeMenuItem(COLLAPSE_ALL);
        Menus.getMenu(Menus.AppMenuBar.VIEW_MENU).removeMenuItem(EXPAND_ALL);

        EditorManager.off(".CodeFolding");
        DocumentManager.off(".CodeFolding");
        ProjectManager.off(".CodeFolding");

        // Remove gutter & revert collapsed sections in all currently open editors
        Editor.forEveryEditor(function (editor) {
            CodeMirror.commands.unfoldAll(editor._codeMirror);
        });
        removeGutters();
    }
418272
public static function text2icons($text)
    {
        // This is a lookbehind assertion which will exclude html entities
        // E.g. situation when ";)" in "&quot;)" shouldn't be replaced by the icon
        // It's so long because of assertion format restrictions
        $entity = '(?<!&'
            . '[a-zA-Z0-9]{2}' . '|' . '#[0-9]{2}' . '|'
            . '[a-zA-Z0-9]{3}' . '|' . '#[0-9]{3}' . '|'
            . '[a-zA-Z0-9]{4}' . '|' . '#[0-9]{4}' . '|'
            . '[a-zA-Z0-9]{5}' . '|'
            . '[a-zA-Z0-9]{6}' . '|'
            . '[a-zA-Z0-9]{7}'
            . ')';

        // map of emoticon replacements
        $map = array(
            '/(?<!mailto):D/'   => self::img_tag('smiley-laughing.gif',    ':D'    ),
            '/:-D/'             => self::img_tag('smiley-laughing.gif',    ':-D'   ),
            '/:\(/'             => self::img_tag('smiley-frown.gif',       ':('    ),
            '/:-\(/'            => self::img_tag('smiley-frown.gif',       ':-('   ),
            '/'.$entity.';\)/'  => self::img_tag('smiley-wink.gif',        ';)'    ),
            '/'.$entity.';-\)/' => self::img_tag('smiley-wink.gif',        ';-)'   ),
            '/8\)/'             => self::img_tag('smiley-cool.gif',        '8)'    ),
            '/8-\)/'            => self::img_tag('smiley-cool.gif',        '8-)'   ),
            '/(?<!mailto):O/i'  => self::img_tag('smiley-surprised.gif',   ':O'    ),
            '/(?<!mailto):-O/i' => self::img_tag('smiley-surprised.gif',   ':-O'   ),
            '/(?<!mailto):P/i'  => self::img_tag('smiley-tongue-out.gif',  ':P'    ),
            '/(?<!mailto):-P/i' => self::img_tag('smiley-tongue-out.gif',  ':-P'   ),
            '/(?<!mailto):@/i'  => self::img_tag('smiley-yell.gif',        ':@'    ),
            '/(?<!mailto):-@/i' => self::img_tag('smiley-yell.gif',        ':-@'   ),
            '/O:\)/i'           => self::img_tag('smiley-innocent.gif',    'O:)'   ),
            '/O:-\)/i'          => self::img_tag('smiley-innocent.gif',    'O:-)'  ),
            '/(?<!O):\)/'       => self::img_tag('smiley-smile.gif',       ':)'    ),
            '/(?<!O):-\)/'      => self::img_tag('smiley-smile.gif',       ':-)'   ),
            '/(?<!mailto):\$/'  => self::img_tag('smiley-embarassed.gif',  ':$'    ),
            '/(?<!mailto):-\$/' => self::img_tag('smiley-embarassed.gif',  ':-$'   ),
            '/(?<!mailto):\*/i'  => self::img_tag('smiley-kiss.gif',       ':*'    ),
            '/(?<!mailto):-\*/i' => self::img_tag('smiley-kiss.gif',       ':-*'   ),
            '/(?<!mailto):S/i'  => self::img_tag('smiley-undecided.gif',   ':S'    ),
            '/(?<!mailto):-S/i' => self::img_tag('smiley-undecided.gif',   ':-S'   ),
        );

        return preg_replace(array_keys($map), array_values($map), $text);
    }
1013759
public void updateEmoji(@NonNull final Emoji emoji) {
    if (!emoji.equals(currentEmoji)) {
      currentEmoji = emoji;

      setImageDrawable(emoji.getDrawable(this.getContext()));
    }
  }
1285030
function mergeEmoticons(child, index, parent) {
  var siblings
  var value
  var siblingIndex
  var node
  var emoticon
  var subvalue

  /* Check if `child`s first character could be used
   * to start an emoticon. */
  if (start.indexOf(toString(child).charAt(0)) !== -1) {
    siblings = parent.children
    siblingIndex = index
    node = child
    value = ''

    while (node) {
      if (value.length >= MAX_EMOTICON_LENGTH) {
        return
      }

      subvalue = toString(node)

      value += subvalue

      /* The second test, if the last character of
       * the current node is superfluous but
       * improves performance by 30%. */
      if (
        node.type !== EMOTICON_NODE &&
        end.indexOf(subvalue.charAt(subvalue.length - 1)) !== -1 &&
        emoticons.indexOf(value) !== -1
      ) {
        emoticon = {type: EMOTICON_NODE, value: value}

        if (child.position && node.position) {
          emoticon.position = {
            start: child.position.start,
            end: node.position.end
          }
        }

        siblings.splice(index, siblingIndex - index + 1, emoticon)

        /* Some emoticons, like `:-`, can be followed by
         * more characters to form other emoticons. */
        return index - 1
      }

      node = siblings[++siblingIndex]
    }
  }
}
570218
function removeThisFunction (tokens, index) {
  for (var i = index + 1; i < tokens.length; i++) {
    var token = tokens[i]
    
    if (token.type === "operator") {
      if(token.data === ";") {
        //Remove the trailing newline
        var nextToken = tokens[i+1]
        if(nextToken.type === "whitespace" && nextToken.data[0] === "\n") {
          nextToken.data = nextToken.data.substr(1)
        }

        //Remove the previous tabs or spaces
        var prevToken = tokens[index-1]
        if(prevToken.type === "whitespace") {
          var indentation = prevToken.data.match("[\t ]*$")[0]
          prevToken.data = prevToken.data.substr(0, prevToken.data.length - indentation.length)
        }

        // Pull out the function
        tokens.splice(index, i - index + 1)
        return
      }
    }
  }
}
718063
public void removeReaction(Emoji emoji, boolean you) {
        Optional<Reaction> reaction = reactions.stream().filter(r -> emoji.equalsEmoji(r.getEmoji())).findAny();
        reaction.ifPresent(r -> ((ReactionImpl) r).decrementCount(you));
        reactions.removeIf(r -> r.getCount() <= 0);
    }
957510
def emoticons_filter(content, exclude='', autoescape=None):
    
    esc = autoescape and conditional_escape or (lambda x: x)
    content = mark_safe(replace_emoticons(esc(content), exclude))
    return content
778648
def icons(self, strip_ext=False):
        ''''''
        result =  [f for f in self._stripped_files if self._icons_pattern.match(f)]
        if strip_ext:
            result = [strip_suffix(f, '\.({ext})'.format(ext=self._icons_ext), regex=True) for f in result]

        return result
1066151
function cleanOptions(options) {
  if (options === undefined) {
    options = {
      selector: 'body'
    };
  } else if (typeof options === 'string') { // keeping compatiblity with version < v0.0.7
    if (options === '/') {
      options = {
        selector: 'body'
      };
    } else {
      options = {
        selector: options
      };
    }
  } else {
    options.selector = options.selector.replace('\\', '');
  }

  if (options.removeLinks === undefined) {
    options.removeLinks = false;
  }

  if (options.inlineCss === undefined) {
    options.inlineCss = true;
  }
  if (options.innerText === undefined) {
    options.innerText = false;
  }

  return options;
}
704239
def remove(self, pkgs):
        
        print("\nRemove packages from the blacklist:\n")
        with open(self.blackfile, "w") as remove:
            for line in self.black_conf.splitlines():
                if line not in pkgs:
                    remove.write(line + "\n")
                else:
                    print("{0}{1}{2}".format(self.meta.color["RED"], line,
                                             self.meta.color["ENDC"]))
                    self.quit = True
            remove.close()
        if self.quit:
            print("")
541873
def remove(pkg):
    '''
    
    '''
    ret = {'result': None, 'output': ""}
    try:
        ret['output'] = subprocess.check_output([SNAP_BINARY_NAME, 'remove', pkg])
        ret['result'] = True
    except subprocess.CalledProcessError as e:
        ret['output'] = e.output
        ret['result'] = False
704864
function removeActionIcon(action, ctrl) {
      delete ctrl.actionLabelNamesMap[action.name];
      delete ctrl.actionIconNamesMap[action.name];
      delete ctrl.actionIcons[action.name];
    }
875264
def teardown_handles(self):
        
        if not isinstance(self.handles.get('artist'), GoogleTiles):
            self.handles['artist'].remove()
1067423
def uninstall_janus():
    '''
    '''
    if exists('~/.vim/janus'):
        run('rm -rf ~/.vim', msg='delete janus repo dir')
        with warn_only():
            run('rm -rf ~/.janus', msg='delete ~/.janus dir')
            run('bash -c "rm ~/.{,g}vimrc{,.before,.after}"',
                msg='delete ~/.vimrc, ~/.vimrc.before, ~/.vimrc.after, '
                    '~/.gvimrc, ~/.gvimrc.before and ~/.gvimrc.after')
            if exists('~/.vim.old'):
                run('mv ~/.vim.old  ~/.vim', msg='restore ~/.vim dir')
            for fname in ['~/.vimrc', '~/.gvimrc']:
                if exists(flo('{fname}.old')):
                    run(flo('mv {fname}.old  {fname}'),
                        msg=flo('restore {fname}'))
        run('ls -hal ~/.*vim*', msg='\nvim config restored:')
    else:
        print_msg('janus is not installed; nothing to do (abort)')
        exit(1)
242142
def _remove_dots(src):
    '''
    
    '''
    output = {}
    for key, val in six.iteritems(src):
        if isinstance(val, dict):
            val = _remove_dots(val)
        output[key.replace('.', '-')] = val
    return output