Skip to content

Instantly share code, notes, and snippets.

@TPXP
TPXP / conver.js
Created June 22, 2020 14:15
PHPass 64-encoding conversion
const phpassbase64 = './0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';
const base64translate = (input) => {
const res = [0];
let currentBit = 0, index = 0;
input.split('').forEach(l => {
const i = phpassbase64.indexOf(l);
res[index] += (i << currentBit) & 0xff;
currentBit += 6;
if(currentBit >= 8) {
@eteubert
eteubert / wordpress-passwort-reset-unmultisite.php
Last active July 10, 2024 22:46
Multisite: Passwort Reset on Local Blog
<?php
/**
* Plugin Name: Multisite: Passwort Reset on Local Blog
* Plugin URI: https://gist.github.com/eteubert/293e07a49f56f300ddbb
* Description: By default, WordPress Multisite uses the main blog for passwort resets. This plugin enables users to stay in their blog during the whole reset process.
* Version: 1.0.0
* Author: Eric Teubert
* Author URI: http://ericteubert.de
* License: MIT
*/